@@ -189,6 +195,11 @@ async function load() {
data.posts.push(... posts)
const batch = []
for (const post of posts) {
+ for(const comment of post.comments) {
+ if (data.users[comment.user] !== undefined) continue
+ if (batch.includes(comment.user)) continue
+ batch.push(comment.user)
+ }
if (data.users[post.user] !== undefined) continue
if (batch.includes(post.user)) continue
batch.push(post.user)
diff --git a/public/login.html b/public/login.html
index 538d248..50b4724 100644
--- a/public/login.html
+++ b/public/login.html
@@ -2,10 +2,10 @@
-
-
-
-
+
+
+
+
XSSBook - Login
diff --git a/public/people.html b/public/people.html
index f0aa514..399751a 100644
--- a/public/people.html
+++ b/public/people.html
@@ -2,14 +2,14 @@
-
-
-
+
+
+
XSSBook - People
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/public/profile.html b/public/profile.html
index 0274327..d17ab09 100644
--- a/public/profile.html
+++ b/public/profile.html
@@ -2,16 +2,16 @@
-
-
-
-
+
+
+
+
XSSBook - Profile
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/src/api.js b/src/api.js
index 3e4cb4d..01edfc6 100644
--- a/src/api.js
+++ b/src/api.js
@@ -59,7 +59,7 @@ router.post('/auth/register', (req, res) => {
if (key === undefined) {
res.status(500).send( {msg: 'Failed to register user'} ); return;
}
- res.status(200).cookie('auth', key).send({msg: 'Successfully registered new user'})
+ res.status(200).cookie('auth', key, { maxAge: 365 * 24 * 60 * 60 * 1000, sameSite: 'strict' }).send({msg: 'Successfully registered new user'})
})
router.post('/auth/login', (req, res) => {
@@ -75,7 +75,7 @@ router.post('/auth/login', (req, res) => {
if (key === undefined) {
res.status(400).send( {msg: 'Invalid login combination'} ); return;
}
- res.status(200).cookie('auth', key).send({msg: 'Successfully logged in'})
+ res.status(200).cookie('auth', key, { maxAge: 365 * 24 * 60 * 60 * 1000, sameSite: 'strict' }).send({msg: 'Successfully logged in'})
})
router.post('/auth/self', (req, res) => {