WikiDocs
WikiDocs copied to clipboard
Lockdown on EDITCODE==VIEWCODE
Describe your issue
When edit and view code are the same (which is not checked) it is impossible to log in as editor afterwards because the session data $_SESSION['wikidocs']['authenticated'] will always be set to 1 rather than 2.
This is because the check if the authentication password matches the view code is done after the check if it matches the edit code and thus overrides the first result.
Device and settings
Debian, nginx, php8.1
Steps to reproduce
- Have a configured WikiDocs instance
- Log in as editor
- Go to settings and set the view code to the same as the edit code and save
- Log out
- Try to log in as editor again
To resolve the issue you need to edit datasets/config.inc.php manually.
Screenshots (optional)
No response
Extra fields
- [ ] I'd like to work on this issue
fixed in 1.0.20