Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_jobs
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_jobs
Commits
efc0d221
Commit
efc0d221
authored
1 month ago
by
Kevin von Spiczak
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] fix page not found logic for unsolicited applications
parent
5dbdda49
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Classes/Controller/JoblistController.php
+14
-2
14 additions, 2 deletions
Classes/Controller/JoblistController.php
with
14 additions
and
2 deletions
Classes/Controller/JoblistController.php
+
14
−
2
View file @
efc0d221
...
...
@@ -367,6 +367,7 @@ class JoblistController extends ActionController {
* @return ResponseInterface
* @throws AspectNotFoundException
* @throws SiteNotFoundException
* @throws ImmediateResponseException
* @throws PageNotFoundException
*/
public
function
applyFormAction
(
...
...
@@ -381,10 +382,21 @@ class JoblistController extends ActionController {
// Check if this page is explicitly configured as an unsolicited application page.
if
((
$this
->
settings
[
'isUnsolicitedApplicationPage'
]
??
FALSE
)
&&
$jobId
!==
NULL
)
{
/** @var PageRenderer $pageRenderer */
$pageRenderer
=
GeneralUtility
::
makeInstance
(
PageRenderer
::
class
);
// the PageRenderer contains the content of the current request, the result of the following sub-request will
// be appended to it, and we get 2 pages, the current one and the 404-page in one. We flush the PageRenderer
// content here, so it will contain only the 404-page content
$pageRenderer
->
setBodyContent
(
''
);
// For unsolicited pages, a job parameter is not allowed
throw
new
\TYPO3\CMS\Core\Error\Http\PageNotFoundException
(
'Job parameter is not allowed on an unsolicited application page.'
$response
=
GeneralUtility
::
makeInstance
(
ErrorController
::
class
)
->
pageNotFoundAction
(
$GLOBALS
[
'TYPO3_REQUEST'
],
'Job parameter is not allowed on an unsolicited application page.'
,
[
'code'
=>
PageAccessFailureReasons
::
PAGE_NOT_FOUND
]
);
throw
new
ImmediateResponseException
(
$response
,
1741779370
);
}
// For regular application pages, if the disallow unsolicited setting is explicitly enabled and no job
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment