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
c484f8aa
Commit
c484f8aa
authored
Feb 12, 2016
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_xhtml_style Base_cancel and logged_in: do not allow redirection outside ERP5 site.
parent
2677f46c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_cancel.xml
...emplateItem/portal_skins/erp5_xhtml_style/Base_cancel.xml
+6
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml
...nTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml
+4
-0
No files found.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_cancel.xml
View file @
c484f8aa
...
@@ -52,6 +52,12 @@
...
@@ -52,6 +52,12 @@
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string
encoding=
"cdata"
>
<![CDATA[
topmost_url_document = context.Base_getURLTopmostDocumentValue()\n
if not topmost_url_document.isURLAncestorOf(cancel_url):\n
return context.ERP5Site_redirect(topmost_url_document.absolute_url(),\n
keep_items={\'portal_status_message\': \'Redirection to an external site prevented.\'},\n
**kw)\n
\n
if \'?selection_name=\' in cancel_url or \'&selection_name=\' in cancel_url:\n
if \'?selection_name=\' in cancel_url or \'&selection_name=\' in cancel_url:\n
# if selection_name is already present in the cancel URL, we do not\n
# if selection_name is already present in the cancel URL, we do not\n
# use erp5_xhtml_style script that would add it again.\n
# use erp5_xhtml_style script that would add it again.\n
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml
View file @
c484f8aa
...
@@ -64,6 +64,10 @@ if portal.portal_membership.isAnonymousUser():\n
...
@@ -64,6 +64,10 @@ if portal.portal_membership.isAnonymousUser():\n
+ ("&came_from=" + url if url else ""))\n
+ ("&came_from=" + url if url else ""))\n
elif not url:\n
elif not url:\n
url = context.absolute_url()\n
url = context.absolute_url()\n
topmost_url_document = context.Base_getURLTopmostDocumentValue()\n
if not topmost_url_document.isURLAncestorOf(url):\n
return context.ERP5Site_redirect(topmost_url_document.absolute_url(),\n
keep_items={\'portal_status_message\': \'Redirection to an external site prevented.\'})\n
return RESPONSE.redirect(url)\n
return RESPONSE.redirect(url)\n
...
...
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