Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
32c28051
Commit
32c28051
authored
May 04, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
csrf: time to make this mandatory
parent
18ad5dac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
guiconfig.inc
src/www/guiconfig.inc
+13
-11
rss.widget.php
src/www/widgets/widgets/rss.widget.php
+0
-2
No files found.
src/www/guiconfig.inc
View file @
32c28051
...
@@ -32,21 +32,23 @@
...
@@ -32,21 +32,23 @@
require_once
(
"util.inc"
);
require_once
(
"util.inc"
);
require_once
(
"config.inc"
);
require_once
(
"config.inc"
);
/* THIS MUST BE ABOVE ALL OTHER CODE */
/* CSRF BEGIN: CHECK MUST BE EXECUTED FIRST; NO EXCEPTIONS */
if
(
empty
(
$nocsrf
))
{
function
csrf_startup
()
{
function
csrf_startup
()
{
global
$config
;
global
$config
;
csrf_conf
(
'rewrite-js'
,
'/csrf/csrf-magic.js'
);
csrf_conf
(
'rewrite-js'
,
'/csrf/csrf-magic.js'
);
$timeout_minutes
=
isset
(
$config
[
'system'
][
'webgui'
][
'session_timeout'
])
?
$config
[
'system'
][
'webgui'
][
'session_timeout'
]
:
240
;
$timeout_minutes
=
isset
(
$config
[
'system'
][
'webgui'
][
'session_timeout'
])
?
$config
[
'system'
][
'webgui'
][
'session_timeout'
]
:
240
;
csrf_conf
(
'expires'
,
$timeout_minutes
*
60
);
csrf_conf
(
'expires'
,
$timeout_minutes
*
60
);
}
session_start
();
require_once
(
'csrf/csrf-magic.php'
);
session_write_close
();
}
}
session_start
();
require_once
(
'csrf/csrf-magic.php'
);
session_write_close
();
/* CSRF END: THANK YOU FOR YOUR COOPERATION */
function
set_language
()
function
set_language
()
{
{
global
$config
;
global
$config
;
...
...
src/www/widgets/widgets/rss.widget.php
View file @
32c28051
...
@@ -26,8 +26,6 @@
...
@@ -26,8 +26,6 @@
POSSIBILITY OF SUCH DAMAGE.
POSSIBILITY OF SUCH DAMAGE.
*/
*/
$nocsrf
=
true
;
require_once
(
"guiconfig.inc"
);
require_once
(
"guiconfig.inc"
);
require_once
(
"pfsense-utils.inc"
);
require_once
(
"pfsense-utils.inc"
);
require_once
(
"simplepie/autoloader.php"
);
require_once
(
"simplepie/autoloader.php"
);
...
...
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