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
b78720b8
Commit
b78720b8
authored
Apr 18, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
csrf: tweak previous
parent
d6411ae0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletion
+4
-1
system.inc
src/etc/inc/system.inc
+1
-0
rc
src/etc/rc
+1
-1
csrf-magic.php
src/www/csrf/csrf-magic.php
+2
-0
No files found.
src/etc/inc/system.inc
View file @
b78720b8
...
...
@@ -963,6 +963,7 @@ function system_webgui_start()
global
$config
;
chdir
(
'/usr/local/www'
);
@
unlink
(
'/usr/local/www/csrf/csrf-secret.php'
);
/* defaults */
$portarg
=
"80"
;
...
...
src/etc/rc
View file @
b78720b8
...
...
@@ -183,7 +183,7 @@ echo "done."
# let the PHP-based configuration subsystem set up the system now
echo
-n
"Launching the init system..."
rm
-f
/
usr/local/www/csrf/csrf-secret.php /
root/lighttpd
*
rm
-f
/root/lighttpd
*
touch
/var/run/booting
/usr/local/etc/rc.bootup
rm
/var/run/booting
...
...
src/www/csrf/csrf-magic.php
View file @
b78720b8
...
...
@@ -425,6 +425,8 @@ function csrf_get_secret()
}
if
(
is_writable
(
$dir
))
{
$secret
=
csrf_generate_secret
();
touch
(
$file
);
chmod
(
$file
,
0600
);
$fh
=
fopen
(
$file
,
'w'
);
fwrite
(
$fh
,
'<?php $secret = "'
.
$secret
.
'";'
.
PHP_EOL
);
fclose
(
$fh
);
...
...
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