Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
946b2e3a
Commit
946b2e3a
authored
Mar 01, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
erp5_web_renderjs_ui: Ensure that came_from is html quoted before redirect
See merge request
nexedi/erp5!1889
parents
4575983a
89838d4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSite_login.py
...teItem/portal_skins/erp5_web_renderjs_ui/WebSite_login.py
+8
-2
No files found.
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSite_login.py
View file @
946b2e3a
REQUEST
=
context
.
REQUEST
REQUEST
=
context
.
REQUEST
RESPONSE
=
REQUEST
.
RESPONSE
RESPONSE
=
REQUEST
.
RESPONSE
from
ZTUtils
import
make_query
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
...
@@ -26,8 +27,13 @@ if (portal.portal_membership.isAnonymousUser()):
...
@@ -26,8 +27,13 @@ if (portal.portal_membership.isAnonymousUser()):
else
:
else
:
message
=
context
.
Base_translateString
(
'Login and/or password is incorrect.'
)
message
=
context
.
Base_translateString
(
'Login and/or password is incorrect.'
)
url
=
'%s/login_form?portal_status_message=%s'
%
(
context
.
absolute_url
(),
message
)
query_dict
=
{
url
=
came_from
and
'%s&came_from=%s'
%
(
url
,
came_from
)
or
url
'portal_status_message'
:
message
,
}
if
came_from
:
query_dict
[
'came_from'
]
=
came_from
url
=
'%s/login_form?%s'
%
(
context
.
absolute_url
(),
make_query
(
query_dict
))
RESPONSE
.
redirect
(
url
)
RESPONSE
.
redirect
(
url
)
else
:
else
:
# XXX How to warn user that password will expire?
# XXX How to warn user that password will expire?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment