Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sucssite
doorkey
Commits
c02b01a3
Commit
c02b01a3
authored
May 02, 2018
by
Imran Hussain
Browse files
Add ability to ban users and add sucs special service accounts
parent
d26c7a0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/index.php
View file @
c02b01a3
<?php
$bannedUsers
=
array
(
"vote"
,
"signup"
,
"cacti"
,
"video"
);
function
ip_in_range
(
$ip
,
$range
)
{
if
(
strpos
(
$range
,
'/'
)
==
false
)
{
$range
.
=
'/32'
;
...
...
@@ -22,12 +24,16 @@ if (!ip_in_range($ipAddr, "137.44.10.128/25")){
}
if
(
isset
(
$_REQUEST
[
'username'
]))
{
$username
=
$_REQUEST
[
'username'
];
$username
=
strtolower
(
$_REQUEST
[
'username'
]
)
;
}
if
(
isset
(
$_REQUEST
[
'password'
]))
{
$password
=
$_REQUEST
[
'password'
];
}
if
(
in_array
(
$username
,
$bannedUsers
)
)
{
die
(
"u r b&"
);
}
include_once
(
"../ldap-auth.php"
);
$isAuthd
=
ldapAuth
(
$username
,
$password
);
...
...
Write
Preview
Supports
Markdown
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