- 15 2月, 2020 1 次提交
-
-
由 Asher 提交于
-
- 14 2月, 2020 3 次提交
- 08 2月, 2020 2 次提交
- 07 2月, 2020 3 次提交
- 06 2月, 2020 5 次提交
- 05 2月, 2020 3 次提交
- 17 1月, 2020 3 次提交
- 17 12月, 2019 1 次提交
-
-
由 Asher 提交于
-
- 15 11月, 2019 1 次提交
-
-
由 Asher 提交于
-
- 08 11月, 2019 3 次提交
-
-
由 Asher 提交于
Fixes issues with unexpected characters breaking things when setting the cookie (like semicolons). This change as-is does not affect the security of code-server itself (we've just replaced the static password with a static hash) but if we were to add a salt in the future it would let us invalidate keys by rehashing with a new salt which could be handy.
-
由 Asher 提交于
If you visit /login/ instead of /login the cookie will be set at /login instead of / which means the cookie can't be read at the root. It will redirect to the login page which *can* read the cookie at /login and redirect back resulting in an infinite loop. The previous solution relied on setting the cookie at / (any invalid value works) which then overrode the login page cookie since parseCookies only kept a single value. So the login page would see the same cookie the root was seeing and not redirect back. However, that behavior depends on the cookies being in the right order which I'm not sure is guaranteed. This new method tests all available cookies and always sets the cookie so the root path will be able to read it in case the login page is seeing a cookie the root can't. It also goes a step further and explicitly sets the path on the cookie which fixes the case where there is a permanent misconfiguration redirecting /login to /login/. Otherwise the cookie would continually be set on /login only and you'd have another loop. It also means you only need to delete one cookie to log out. Lastly add some properties to make the cookies a bit more secure.
-
由 ecrode 提交于
Should prevent endless redirects when the cookie is set on a different path or domain (like with a dot prefix).
-
- 01 11月, 2019 1 次提交
-
-
由 Asher 提交于
-
- 31 10月, 2019 1 次提交
-
-
由 Asher 提交于
-
- 30 10月, 2019 3 次提交
- 29 10月, 2019 5 次提交
- 28 10月, 2019 1 次提交
-
-
由 Asher 提交于
Fixes #1050.
-
- 26 10月, 2019 3 次提交
- 25 10月, 2019 1 次提交
-
-
由 Asher 提交于
See #1103.
-