Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
87
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
cb82c0d7
Commit
cb82c0d7
authored
7 years ago
by
Benoit Rat
Committed by
Adam Wujek
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[BUG: 1570]: www: user can only see sysinfo.php if logged-in
parent
0b552b8b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
userspace/rootfs_override/var/www/footer.php
+5
-1
5 additions, 1 deletion
userspace/rootfs_override/var/www/footer.php
userspace/rootfs_override/var/www/sysinfo.php
+28
-2
28 additions, 2 deletions
userspace/rootfs_override/var/www/sysinfo.php
with
33 additions
and
3 deletions
userspace/rootfs_override/var/www/footer.php
+
5
−
1
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>
This diff is collapsed.
Click to expand it.
userspace/rootfs_override/var/www/sysinfo.php
+
28
−
2
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'
);
}
?>
This diff is collapsed.
Click to expand it.
Preview
0%
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