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
7868c2c0
Commit
7868c2c0
authored
Jun 06, 2019
by
Dominik Hebeler
Browse files
temp change
parent
4a010d22
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/HumanVerification.php
View file @
7868c2c0
...
...
@@ -62,6 +62,15 @@ class HumanVerification extends Controller
$dowCheck
=
strtolower
(
trim
(
$request
->
input
(
'dw'
,
''
)))
===
$weekdays
[
$lang
][
$dow
-
1
];
# Temp remove later
# Check for recent Spams
if
(
\
preg_match
(
"/eingabe=[
\\
d]
{
3
}
\s*chan.*$/si"
,
$url
))
{
# Sleep a random time
$rand
=
rand
(
0
,
15
);
sleep
(
$rand
);
$dowCheck
=
false
;
}
$user
=
$redis
->
hgetall
(
HumanVerification
::
PREFIX
.
"."
.
$id
);
$user
=
[
'uid'
=>
$user
[
"uid"
],
'id'
=>
$user
[
"id"
],
...
...
@@ -243,9 +252,6 @@ class HumanVerification extends Controller
# Check for recent Spams
$eingabe
=
\
Request
::
input
(
'eingabe'
);
if
(
\
preg_match
(
"/^[
\\
d]
{
3
}
\s*chan.*$/si"
,
$eingabe
))
{
return
true
;
}
if
(
\
preg_match
(
"/^susimail\s+-site:[^\s]+\s-site:/si"
,
$eingabe
))
{
return
true
;
}
...
...
app/Http/Middleware/HumanVerification.php
View file @
7868c2c0
...
...
@@ -101,6 +101,15 @@ class HumanVerification
"lockedKey"
=>
""
,
];
}
# Temp remove later
# Check for recent Spams
$eingabe
=
\
Request
::
input
(
'eingabe'
);
if
(
\
preg_match
(
"/^[
\\
d]
{
3
}
\s*chan.*$/si"
,
$eingabe
))
{
# Sleep a random time between 1 and 5 seconds
$rand
=
rand
(
0
,
5
);
sleep
(
$rand
);
$user
[
"locked"
]
=
true
;
}
# A lot of automated requests are from websites that redirect users to our result page.
# We will detect those requests and put a captcha
...
...
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