Compare commits
2 Commits
e870c180b9
...
45c5af1757
Author | SHA1 | Date |
---|---|---|
Tracker-Friendly | 45c5af1757 | |
Tracker-Friendly | 0bfad634d8 |
4
main
4
main
|
@ -663,8 +663,8 @@ async def login():
|
|||
conn.close()
|
||||
|
||||
response = Response("""<script>window.location.href = "/oauth";</script>""")
|
||||
response.set_cookie("session_DO_NOT_SHARE", randomCharacters)
|
||||
response.set_cookie("legacy_migrate", "1")
|
||||
response.set_cookie("session_DO_NOT_SHARE", randomCharacters, samesite="Strict", secure=True)
|
||||
response.set_cookie("legacy_migrate", "1", samesite="Strict", secure=True)
|
||||
return response
|
||||
|
||||
#resp = await make_response(redirect("/"))
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
.then((response) => {
|
||||
async function doStuff2() {
|
||||
if (response.status == 200) {
|
||||
document.cookie = 'legacy_migrate=; Max-Age=0; path=/;"
|
||||
document.cookie = "legacy_migrate=; Max-Age=0; path=/;"
|
||||
window.location.replace("/")
|
||||
} else {
|
||||
document.getElementById("text").innerText = "Failed: " + key["error"]
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
|
||||
function cuser_authorize() {
|
||||
document.cookie = "prefuser" + "=" + window.prompt("Choose your custom username (cannot be longer than 20 characters)") + "; expires=Session" + "; path=/" + "; samesite=Strict";
|
||||
document.cookie = "prefuser" + "=" + window.prompt("Choose your custom username (cannot be longer than 20 characters)") + "; expires=Session" + "; path=/" + "; samesite=Strict; secure=true;";
|
||||
authorize()
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@
|
|||
async function doStuff2() {
|
||||
let key = await response.json()
|
||||
if (response.status == 200) {
|
||||
document.cookie = "session_DO_NOT_SHARE" + "=" + (key["key"] || "") + "; expires=Session" + "; path=/" + "; samesite=Strict";
|
||||
document.cookie = "session_DO_NOT_SHARE" + "=" + (key["key"] || "") + "; expires=Session" + "; path=/" + "; samesite=Strict; secure=true;"
|
||||
window.location.replace("/")
|
||||
} else if (response.status == 422) {
|
||||
document.getElementById("text").innerText = "Username taken. Migrate or choose a new custom username!"
|
||||
|
|
Reference in New Issue