Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qfq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
typo3
qfq
Commits
37bb2328
Commit
37bb2328
authored
6 years ago
by
Carsten Rose
Browse files
Options
Downloads
Patches
Plain Diff
Missing Cookie error message: removed, cause for autocron jobs (via wget) there is no cookie
parent
925a47f1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#775
passed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
extension/qfq/qfq/helper/DownloadPage.php
+12
-11
12 additions, 11 deletions
extension/qfq/qfq/helper/DownloadPage.php
with
12 additions
and
11 deletions
extension/qfq/qfq/helper/DownloadPage.php
+
12
−
11
View file @
37bb2328
...
...
@@ -45,25 +45,26 @@ class DownloadPage {
throw
new
UserReportException
(
"php.ini: 'allow_url_fopen' is off and needs to be open to get '
$page
''"
,
ERROR_DOWNLOAD_FOPEN_BLOCKED
);
}
if
(
!
isset
(
$_COOKIE
[
SESSION_NAME
]))
{
throw
new
UserReportException
(
'Error: missing QFQ cookie - allow cookies in your browser'
,
ERROR_MISSING_COOKIE
);
}
// Download page
$ctx
=
array
(
"ssl"
=>
array
(
"verify_peer"
=>
false
,
"verify_peer_name"
=>
false
,
),
// Copy cookie: to forward current QFQ user session
'http'
=>
array
(
'method'
=>
"GET"
,
'header'
=>
"Accept-language: en
\r\n
"
.
"Cookie: "
.
SESSION_NAME
.
"="
.
$_COOKIE
[
SESSION_NAME
]
.
"
\r\n
"
,
),
);
if
(
isset
(
$_COOKIE
[
SESSION_NAME
]))
{
$cookie
=
array
(
// Copy cookie: to forward current QFQ user session
'http'
=>
array
(
'method'
=>
"GET"
,
'header'
=>
"Accept-language: en
\r\n
"
.
"Cookie: "
.
SESSION_NAME
.
"="
.
$_COOKIE
[
SESSION_NAME
]
.
"
\r\n
"
,
),
);
$ctx
=
array_merge
(
$ctx
,
$cookie
);
}
// The current session needs to be closed, cause the SESSION needs to be opened again by processing get_file_contents()
// T3 is started again to render the requested page
Session
::
close
();
...
...
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