Bug #54187
Router ignores default Suffix from browser
Status: | Resolved | Start date: | 2013-12-04 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | - | |||
Target version: | - |
Description
Since Neos beta 2 one has to set the defaultUriSuffix. If you set it to .html all links will be created like "page1.html", "page2.html" etc. So far so good.
But if you enter an address like "page1.jgsdhjgasjdhg" or "page2.FooBarBaz" in your browser, the page is still displayed despite the wrong suffix. You can just enter anything. Only the name is processed. This behavior is rather unexpected. An unknown suffix should at least return a 404 status.
Best wishes,
Thomas
P.S.: Sorry if this is in the wrong project. Not sure where to put. It seems like a routing problem and not Neos specific.
Related issues
Associated revisions
[!!!][BUGFIX] Only accepts URLs with the configured URI suffix
This change removes two obsolete routes and adjusts the
``FrontendNodeRoutePartHandler`` so that it matches the full node path.
Background:
The route "Content with some format" accepted all URLs in the format
``{node}.{@format}`` which lead to duplicate content (if your default
suffix is empty and the user appends ".html") and weird errors (if an
arbitrary extension is added to the path, like "some/path.anything").
Besides this change simplifies the ``FrontendNodeRoutePartHandler`` so
that it does not ignore the ``splitString`` option if no dot could be
found in the request path.
This is a breaking change if you relied on the fact that any format
suffix is accepted by Neos.
If you provide a custom format (for example "ics") you should register
a custom route for it in your package::
-
name: 'ICS'
uriPattern: '{node}.ics'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@action': 'show'
'@format': 'ics'
routeParts:
'node':
handler: 'TYPO3\Neos\Routing\FrontendNodeRoutePartHandler'
Releases: master, 1.0
Change-Id: Iea1b92b07daba69f5f76cd7ceb7b81f2d14d68a1
Fixes: #54187
Related: #54217
Related: #55492
Reviewed-on: https://review.typo3.org/25980
Tested-by: Bastian Waidelich
Reviewed-by: Dominique Feyer
Tested-by: Dominique Feyer
Reviewed-by: Aske Ertmann
Reviewed-by: Bastian Waidelich
[BUGFIX] Prevent exception when matching incoming context URIs
This fixes a regression that was introduced with a previous commit
which resulted in an exception when logging into the backend.
Background:
A previous commit (Iea1b92b07daba69f5f76cd7ceb7b81f2d14d68a1)
streamlined the mapping of request paths to a node.
Unfortunately this introduced a regression that resulted in an
exception being thrown whenever a context URI (containing the
"@workspace" part) was matched by the homepage route.
This change fixes this by testing whether the given context path
could be matched.
Change-Id: Icd3be53d5d8abd44701ccacfbdd471090b88450c
Related: #54187
Releases: master
Reviewed-on: https://review.typo3.org/27688
Tested-by: Bastian Waidelich
Reviewed-by: Marc Neuhaus
Tested-by: Marc Neuhaus
Reviewed-by: Bastian Waidelich
[!!!][BUGFIX] Only accepts URLs with the configured URI suffix
This change removes two obsolete routes and adjusts the
``FrontendNodeRoutePartHandler`` so that it matches the full node path.
Background:
The route "Content with some format" accepted all URLs in the format
``{node}.{@format}`` which lead to duplicate content (if your default
suffix is empty and the user appends ".html") and weird errors (if an
arbitrary extension is added to the path, like "some/path.anything").
Besides this change simplifies the ``FrontendNodeRoutePartHandler`` so
that it does not ignore the ``splitString`` option if no dot could be
found in the request path.
This is a breaking change if you relied on the fact that any format
suffix is accepted by Neos.
If you provide a custom format (for example "ics") you should register
a custom route for it in your package::
-
name: 'ICS'
uriPattern: '{node}.ics'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@action': 'show'
'@format': 'ics'
routeParts:
'node':
handler: 'TYPO3\Neos\Routing\FrontendNodeRoutePartHandler'
Releases: master, 1.0
Change-Id: Iea1b92b07daba69f5f76cd7ceb7b81f2d14d68a1
Fixes: #54187
Related: #54217
Related: #55492
Reviewed-on: https://review.typo3.org/27656
Reviewed-by: Bastian Waidelich
Tested-by: Bastian Waidelich
Reviewed-by: Aske Ertmann
History
#1 Updated by Bastian Waidelich over 1 year ago
- Project changed from TYPO3.Flow to TYPO3.Neos
- Status changed from New to Accepted
- Assigned To set to Bastian Waidelich
#2 Updated by Bastian Waidelich over 1 year ago
The reason for this behavior is this route:
1- 2 name: 'Content with some format' 3 uriPattern: '{node}.{@format}' 4 appendExceedingArguments: true
in Routes.Frontend.yaml.
Needs to be discussed
#3 Updated by Jan Kiesewetter over 1 year ago
To fix this manually I loaded the
Routes.yaml from git
https://git.typo3.org/Neos/Distributions/Base.git/blob_plain/224ea64520e1f54c3e9a30e79c163e9220ee8e67:/Configuration/Routes.yaml
and put it in neos/Configuration/Routes.yaml
#4 Updated by Bastian Waidelich over 1 year ago
Jan Kiesewetter wrote:
To fix this manually I loaded the
Routes.yaml from git [...]
Jan, thanks for the feedback, but this is a different issue.
#5 Updated by Andreas Wolf over 1 year ago
To me, this looks like it is related to #54217.
#6 Updated by Gerrit Code Review over 1 year ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25980
#7 Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25980
#8 Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25980
#9 Updated by Gerrit Code Review over 1 year ago
Patch set 4 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25980
#10 Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25980
#11 Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 1.0 of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/27656
#12 Updated by Bastian Waidelich over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset eaaa9aef205283547df3dc0e1d7883a7fe09cd5f.
#13 Updated by Gerrit Code Review over 1 year ago
- Status changed from Resolved to Under Review
Patch set 2 for branch 1.0 of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/27656
#14 Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch 1.0 of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/27656
#15 Updated by Bastian Waidelich over 1 year ago
- Status changed from Under Review to Resolved
Applied in changeset 437ec25a5c3ee52b836267e0bf2805b8a253a058.