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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matevz Golob
erp5
Commits
c28fe4ba
Commit
c28fe4ba
authored
Aug 07, 2019
by
Roque
Committed by
Roque
Aug 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web: check url symbols when dropping VirtualHostMonster elements in
url - corresponding test added
parent
50c48582
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
bt5/erp5_web/DocumentTemplateItem/portal_components/document.erp5.StaticWebSection.py
...eItem/portal_components/document.erp5.StaticWebSection.py
+3
-1
bt5/erp5_web_ui_test/TestTemplateItem/portal_components/test.erp5.testStaticWebSiteRedirection.py
...rtal_components/test.erp5.testStaticWebSiteRedirection.py
+3
-0
No files found.
bt5/erp5_web/DocumentTemplateItem/portal_components/document.erp5.StaticWebSection.py
View file @
c28fe4ba
...
...
@@ -37,6 +37,8 @@ from Products.ERP5Type import Permissions
from
webdav.NullResource
import
NullResource
import
urllib
MARKER
=
[]
class
StaticWebSection
(
WebSection
):
...
...
@@ -67,7 +69,7 @@ class StaticWebSection(WebSection):
# Drop the automatically added VirtualHostMonster object ID
virtual_url_part_tuple
=
request
.
get
(
'VIRTUAL_URL_PARTS'
,
None
)
if
(
virtual_url_part_tuple
is
not
None
)
and
\
(
not
virtual_url_part_tuple
[
1
]
.
endswith
(
"/"
.
join
(
url_list
))):
(
not
urllib
.
unquote
(
virtual_url_part_tuple
[
1
])
.
endswith
(
"/"
.
join
(
url_list
))):
url_list
.
pop
(
0
)
if
request
.
get
(
'ACTUAL_URL'
,
''
).
endswith
(
"/"
):
# or len(url_list) == 0:
...
...
bt5/erp5_web_ui_test/TestTemplateItem/portal_components/test.erp5.testStaticWebSiteRedirection.py
View file @
c28fe4ba
...
...
@@ -166,6 +166,9 @@ class TestStaticWebSiteRedirection(ERP5TypeTestCase):
def
test_queryStringRedirectSlashQuestion
(
self
):
self
.
runTestRedirect
(
"foo/bar/?"
)
def
test_queryStringRedirectWithEqual
(
self
):
self
.
runTestRedirect
(
"foo/bar="
)
@
unittest
.
expectedFailure
def
test_queryStringIgnoreLayout
(
self
):
self
.
runTestRedirect
(
"?ignore_layout=1"
)
...
...
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