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
open-source
MetaGer
Commits
be538832
Commit
be538832
authored
Mar 06, 2019
by
Dominik Hebeler
Browse files
Fixed a bug in humanprotection
parent
aea7af72
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/HumanVerification.php
View file @
be538832
...
...
@@ -168,7 +168,7 @@ class HumanVerification extends Controller
private
static
function
checkId
(
$request
,
$id
)
{
if
(
hash
(
"sha512"
,
$request
->
ip
()
.
$_SERVER
[
"AGENT"
])
===
$id
)
{
if
(
hash
(
"sha512"
,
$request
->
ip
()
.
$_SERVER
[
"AGENT"
]
.
"uid"
)
===
$id
)
{
return
true
;
}
else
{
return
false
;
...
...
app/Http/Middleware/HumanVerification.php
View file @
be538832
...
...
@@ -27,7 +27,7 @@ class HumanVerification
$redis
=
Redis
::
connection
(
'redisCache'
);
try
{
$id
=
hash
(
"sha512"
,
$request
->
ip
());
$uid
=
hash
(
"sha512"
,
$request
->
ip
()
.
$_SERVER
[
"AGENT"
]);
$uid
=
hash
(
"sha512"
,
$request
->
ip
()
.
$_SERVER
[
"AGENT"
]
.
"uid"
);
unset
(
$_SERVER
[
"AGENT"
]);
/**
...
...
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