Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server times out if trying to access /account while not logged in #3605

Closed
calculuschild opened this issue Jul 31, 2024 · 4 comments · Fixed by #3677
Closed

Server times out if trying to access /account while not logged in #3605

calculuschild opened this issue Jul 31, 2024 · 4 comments · Fixed by #3677
Labels
P0 - security or data loss Possible damage to server, users, or data

Comments

@calculuschild
Copy link
Member

We need to check if a user is logged in and handle the case if not.

2024-07-31T20:11:05.320603+00:00 app[web.1]: TypeError: Cannot read properties of undefined (reading 'username')
2024-07-31T20:11:05.320614+00:00 app[web.1]:     at renderAccountPage (/app/build/homebrew/ssr.js:3009:133)
2024-07-31T20:11:05.320614+00:00 app[web.1]:     at AccountPage (/app/build/homebrew/ssr.js:3025:6)
2024-07-31T20:11:05.320615+00:00 app[web.1]:     at Fb (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:65:44)
2024-07-31T20:11:05.320615+00:00 app[web.1]:     at Ib (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:67:254)
2024-07-31T20:11:05.320616+00:00 app[web.1]:     at W (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:73:89)
2024-07-31T20:11:05.320616+00:00 app[web.1]:     at Ib (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:67:482)
2024-07-31T20:11:05.320616+00:00 app[web.1]:     at W (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:73:89)
2024-07-31T20:11:05.320617+00:00 app[web.1]:     at Ib (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:71:304)
2024-07-31T20:11:05.320617+00:00 app[web.1]:     at W (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:73:89)
2024-07-31T20:11:05.320617+00:00 app[web.1]:     at Ib (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:67:482)
2024-07-31T20:11:06.496145+00:00 app[web.1]: TypeError: Cannot read properties of undefined (reading 'username')
2024-07-31T20:11:06.496170+00:00 app[web.1]:     at renderAccountPage (/app/build/homebrew/ssr.js:3009:133)
2024-07-31T20:11:06.496170+00:00 app[web.1]:     at AccountPage (/app/build/homebrew/ssr.js:3025:6)
2024-07-31T20:11:06.496171+00:00 app[web.1]:     at Fb (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:65:44)
2024-07-31T20:11:06.496171+00:00 app[web.1]:     at Ib (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:67:254)
2024-07-31T20:11:06.496172+00:00 app[web.1]:     at W (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:73:89)
2024-07-31T20:11:06.496173+00:00 app[web.1]:     at Ib (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:67:482)
2024-07-31T20:11:06.496173+00:00 app[web.1]:     at W (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:73:89)
2024-07-31T20:11:06.496173+00:00 app[web.1]:     at Ib (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:71:304)
2024-07-31T20:11:06.496173+00:00 app[web.1]:     at W (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:73:89)
2024-07-31T20:11:06.496174+00:00 app[web.1]:     at Ib (/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:67:482)
@calculuschild calculuschild added the P0 - security or data loss Possible damage to server, users, or data label Jul 31, 2024
@5e-Cleric
Copy link
Member

Hmm, good catch. it should probably redirect to a new brew or to the login if the user is not logged in.

@5e-Cleric
Copy link
Member

But is it P0? no data is lost, 99% of users won't be able to get into the page while not logged in.

@calculuschild
Copy link
Member Author

calculuschild commented Aug 1, 2024

It crashes the whole server, which means the site is down for everyone. People editing brews might lose work if the server is down.

@5e-Cleric
Copy link
Member

Ah, must admit i tried the moment i saw the title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 - security or data loss Possible damage to server, users, or data
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants