The loginRedirect cookie value was used directly in res.redirect() and
window.location.replace() without validation, allowing redirection to
arbitrary external URLs. Added validation to ensure the redirect target
is a relative path before use.
Co-authored-by: kolega.dev <faizan@kolega.ai>
This commit resolves the recurring issue where password managers
incorrectly autofill the header search bar when viewing the user
profile page.
This is achieved by wrapping the password change fields in a <form>
element, properly scoping them for browser autofill logic, and using
modern, standard `autocomplete` attributes. This addresses the root
cause of the issue, whereas previous attempts tried to mitigate the
symptom in the search bar.
Fixes#2324Closes#3327
* feat: Add link to admin area on welcome page
See: #1259
* fix: remove trailing slash from welcome admin button
* fix: welcome page admin button link
Co-authored-by: Nicolas Giard <github@ngpixel.com>
* First take on removing erroneous path characters
Paths should not accept trailing slashes or hashtags. This is a first attempt at nullifying those.
* Use rules to verify path before acceptance
Use Regex and rules to verify paths before acceptance
* Rules to prevent any leading or trailing slashes
* Complex slug for regex on path, but it elminates special chars
* Added yarn.lock to .gitignore
* Maybe we do want yarn.lock afterall
* Adding yarn.lock
* Move Regex pattern outside of export
If a wiki is configured to be private, eg guest does not have any permissions to view any of the pages on the wiki, it is an annoyance to always be told that you aren't authorized to view a page when you aren't logged in. A more natural flow in this sort of scenario would be to be automatically directed to the login page so that the user can authenticate (and then hopefully gain access to the page).
This change adds a configuration option to the security page to enable "Bypass Unauthatorized Screen" functionality. This option defaults to false, so there is no change in behavior for existing/new installations, it is an opt-in configuration change.
Two new translatable strings are added:
"admin:security.bypassUnauthorized": "Bypass Unauthorized Screen"
"admin:security.bypassUnauthorizedHint": "Should the user be redirected automatically to the login screen if they are not authenticated and attempt to access a page not accessible to Guest"
At present, the user that are not in the administrator group have no access to edit scripts and styles in page editor panel. This commit add configuration in group rule manage webpage so that users' permission on writing styles and writing scripts can be modified.
When using inline math ($e^{-x^2}$) the curly braces are interpreted as
attributes by markdown-it-attrs. Since most of the times they are not
valid attributes they simply get removed.
This patch escapes the curly braces (the default attribute delimiter),
fixing the KaTeX rendering errors.
It would be nice to simply skip that rule for `katex_inline` block types
but as far as I know markdown-it-attrs doesn't have such an option.
Fixes#1581