Skip to content

Commit

Permalink
add security fix to lighttpd
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 24, 2015
1 parent b3ebf1d commit 5313740
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
7 changes: 2 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@
<?php if(!isset($_SESSION["user"])) {?>
<form action="" method="post" class="navbar-form navbar-right" >
<div class="form-group">
<input type="text" name="username" placeholder="User" class="form-control input-sm">
<input type="text" name="username" placeholder="User" class="form-control input-sm" required="">
</div>
<div class="form-group">
<input type="password" name="password" placeholder="Password" class="form-control input-sm">
<input type="password" name="password" placeholder="Password" class="form-control input-sm" required="">
</div>
<input type="hidden" name="form_login" value="log">
<button type="submit" class="btn-xs btn-primary">Sign in</button>
Expand Down Expand Up @@ -163,6 +163,3 @@
<?php
}
?>



1 change: 1 addition & 0 deletions install/lighttpd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ sed -i -e 's/server.document-root = \"\/var\/www\"/server.document-root
# didable dir access
sed -i '/url.access-deny/d' /etc/lighttpd/lighttpd.conf
sed -i '$a url.access-deny = ( "~", ".inc", ".dbf", ".db", ".txt", ".rrd" )' /etc/lighttpd/lighttpd.conf
sed -i '$a $HTTP["url"] =~ "^/modules" { url.access-deny = ("") }' /etc/lighttpd/lighttpd.conf
# set url rewrite
if cat /etc/lighttpd/lighttpd.conf |grep url.rewrite-once 1> /dev/null; then
echo -e "[ ${GREEN}ok${R} ] lighttpd: Url rewrite exist"
Expand Down
8 changes: 6 additions & 2 deletions modules/login/denied.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<span class="belka">&nbsp info<span class="okno">
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title">Warning</h3>
</div>
<div class="panel-body">
<h3>Please login!</h3>
</span></span>
</div></div>
3 changes: 0 additions & 3 deletions modules/mail/html/mail_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
<form class="form-horizontal" action="" method="post">
<fieldset>

<!-- Form Name -->
<legend>Send test mail</legend>

<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="user">@</label>
Expand Down
6 changes: 6 additions & 0 deletions modules/security/fw/html/fw.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<?php
if(!isset($_SESSION['user'])){
header("Location: denied");
}
?>

<?php
$fw_onoff = isset($_POST['fw_onoff']) ? $_POST['fw_onoff'] : '';
$onoff = isset($_POST['onoff']) ? $_POST['onoff'] : '';
Expand Down

0 comments on commit 5313740

Please sign in to comment.