Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
cb82c0d7
Commit
cb82c0d7
authored
May 18, 2017
by
Benoit Rat
Committed by
Adam Wujek
Aug 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUG: 1570]: www: user can only see sysinfo.php if logged-in
parent
0b552b8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
footer.php
userspace/rootfs_override/var/www/footer.php
+5
-1
sysinfo.php
userspace/rootfs_override/var/www/sysinfo.php
+28
-2
No files found.
userspace/rootfs_override/var/www/footer.php
View file @
cb82c0d7
...
...
@@ -2,5 +2,9 @@
<a
href=
'http://www.ohwr.org/projects/wr-switch-sw'
target=
"_blank"
><IMG
SRC=
'img/ohr.png'
align=
left
,
vspace=
7,
hspace=
5,
width=
35
,
hight=
100
,
border=
0
,
alt=
'OHR'
></a>
<p>
White Rabbit Project - Open Hardware and Source Project
<a
class=
"footer-link"
target=
"_blank"
href=
"http://www.ohwr.org/projects/white-rabbit/wiki"
>
White-Rabbit OHR
</a>
<a
href=
'sysinfo.php'
target=
"_blank"
><IMG
SRC=
'img/light_php.png'
align=
right
,
vspace=
7,
hspace=
5,
width=
100
,
hight=
100
,
border=
0
,
alt=
'PHP Info'
></a>
<?php
if
(
isset
(
$_SESSION
[
'myusername'
]))
echo
"<a href='sysinfo.php' target='_blank'>"
;
echo
"<IMG SRC='img/light_php.png' align=right , vspace=7, hspace=5, width=100 , hight=100 , border=0 , alt='PHP Info'>"
;
if
(
isset
(
$_SESSION
[
'myusername'
]))
echo
"</a>"
;
?>
</p>
userspace/rootfs_override/var/www/sysinfo.php
View file @
cb82c0d7
<?php
<?php
include
'functions.php'
;
ob_start
();
if
(
strcmp
(
$_SESSION
[
'LASTIME'
],
filectime
(
$GLOBALS
[
'kconfigfile'
]))
&&
strcmp
(
basename
(
$_SERVER
[
'PHP_SELF'
]),
"reboot.php"
)){
echo
"<script>
alert('WARNING: Dotconfig has been modified. Realoading configuration...');
window.location.href='index.php';
</script>"
;
load_kconfig
();
}
if
(
isset
(
$_SESSION
[
'LAST_ACTIVITY'
])
&&
(
!
empty
(
$_SESSION
[
"myusername"
]))
&&
(
time
()
-
$_SESSION
[
'LAST_ACTIVITY'
]
>
600
))
{
// last request was more than 10 minutes ago
session_unset
();
session_destroy
();
header
(
'Location: index.php'
);
}
$_SESSION
[
'LAST_ACTIVITY'
]
=
time
();
phpinfo
();
if
(
isset
(
$_SESSION
[
'myusername'
]))
{
phpinfo
();
}
else
{
header
(
'Location: index.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