Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Show more breadcrumbs
open-source
MetaGer
Commits
46b56fa8
Commit
46b56fa8
authored
4 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
added recent spam
parent
9d3ab4f4
No related branches found
No related tags found
5 merge requests
!1645
Development
,
!1641
Development
,
!1635
Development
,
!1634
Development
,
!1631
Development
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/Http/Controllers/HumanVerification.php
+10
-6
10 additions, 6 deletions
app/Http/Controllers/HumanVerification.php
with
10 additions
and
6 deletions
app/Http/Controllers/HumanVerification.php
+
10
−
6
View file @
46b56fa8
...
@@ -105,7 +105,7 @@ class HumanVerification extends Controller
...
@@ -105,7 +105,7 @@ class HumanVerification extends Controller
private
static
function
saveUser
(
$user
)
private
static
function
saveUser
(
$user
)
{
{
$userList
=
Cache
::
get
(
HumanVerification
::
PREFIX
.
"."
.
$user
[
"id"
],
[]);
$userList
=
Cache
::
get
(
HumanVerification
::
PREFIX
.
"."
.
$user
[
"id"
],
[]);
if
(
$user
[
"whitelist"
])
{
if
(
$user
[
"whitelist"
])
{
$user
[
"expiration"
]
=
now
()
->
addWeeks
(
2
);
$user
[
"expiration"
]
=
now
()
->
addWeeks
(
2
);
}
else
{
}
else
{
...
@@ -204,13 +204,16 @@ class HumanVerification extends Controller
...
@@ -204,13 +204,16 @@ class HumanVerification extends Controller
return
true
;
return
true
;
}
else
if
(
\preg_match
(
"/^\s*site:
\"
linkedin\.com[^
\"
]*
\"
\s+/si"
,
$eingabe
))
{
}
else
if
(
\preg_match
(
"/^\s*site:
\"
linkedin\.com[^
\"
]*
\"
\s+/si"
,
$eingabe
))
{
return
true
;
return
true
;
}
else
if
(
\preg_match
(
"/^\d+.(php|asp)\s+\?.*=.*/si"
,
$eingabe
))
{
return
true
;
}
}
return
$possibleSpammer
;
return
$possibleSpammer
;
}
}
public
function
botOverview
(
Request
$request
){
public
function
botOverview
(
Request
$request
)
{
$id
=
""
;
$id
=
""
;
$uid
=
""
;
$uid
=
""
;
$ip
=
$request
->
ip
();
$ip
=
$request
->
ip
();
...
@@ -232,7 +235,8 @@ class HumanVerification extends Controller
...
@@ -232,7 +235,8 @@ class HumanVerification extends Controller
->
with
(
'user'
,
$user
);
->
with
(
'user'
,
$user
);
}
}
public
function
botOverviewChange
(
Request
$request
)
{
public
function
botOverviewChange
(
Request
$request
)
{
$id
=
""
;
$id
=
""
;
$uid
=
""
;
$uid
=
""
;
$ip
=
$request
->
ip
();
$ip
=
$request
->
ip
();
...
@@ -247,11 +251,11 @@ class HumanVerification extends Controller
...
@@ -247,11 +251,11 @@ class HumanVerification extends Controller
$userList
=
Cache
::
get
(
HumanVerification
::
PREFIX
.
"."
.
$id
);
$userList
=
Cache
::
get
(
HumanVerification
::
PREFIX
.
"."
.
$id
);
$user
=
$userList
[
$uid
];
$user
=
$userList
[
$uid
];
if
(
$request
->
filled
(
"locked"
)){
if
(
$request
->
filled
(
"locked"
))
{
$user
[
"locked"
]
=
boolval
(
$request
->
input
(
'locked'
));
$user
[
"locked"
]
=
boolval
(
$request
->
input
(
'locked'
));
}
elseif
(
$request
->
filled
(
"whitelist"
))
{
}
elseif
(
$request
->
filled
(
"whitelist"
))
{
$user
[
"whitelist"
]
=
boolval
(
$request
->
input
(
'whitelist'
));
$user
[
"whitelist"
]
=
boolval
(
$request
->
input
(
'whitelist'
));
}
elseif
(
$request
->
filled
(
"unusedResultPages"
))
{
}
elseif
(
$request
->
filled
(
"unusedResultPages"
))
{
$user
[
"unusedResultPages"
]
=
intval
(
$request
->
input
(
'unusedResultPages'
));
$user
[
"unusedResultPages"
]
=
intval
(
$request
->
input
(
'unusedResultPages'
));
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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