mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-02-27 16:32:48 +00:00
Update RegisterController
This commit is contained in:
parent
5c0dee018e
commit
3b7ff030f2
2 changed files with 9 additions and 0 deletions
|
@ -68,6 +68,10 @@ class RegisterController extends Controller
|
||||||
$underscore = substr_count($value, '_');
|
$underscore = substr_count($value, '_');
|
||||||
$period = substr_count($value, '.');
|
$period = substr_count($value, '.');
|
||||||
|
|
||||||
|
if(ends_with($value, ['.php', '.js', '.css'])) {
|
||||||
|
return $fail('Username is invalid.');
|
||||||
|
}
|
||||||
|
|
||||||
if(($dash + $underscore + $period) > 1) {
|
if(($dash + $underscore + $period) > 1) {
|
||||||
return $fail('Username is invalid. Can only contain one dash (-), period (.) or underscore (_).');
|
return $fail('Username is invalid. Can only contain one dash (-), period (.) or underscore (_).');
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,7 @@ class RestrictedNames
|
||||||
|
|
||||||
// Static Assets
|
// Static Assets
|
||||||
'assets',
|
'assets',
|
||||||
|
'public',
|
||||||
'storage',
|
'storage',
|
||||||
|
|
||||||
// Laravel Horizon
|
// Laravel Horizon
|
||||||
|
@ -141,6 +142,8 @@ class RestrictedNames
|
||||||
'drives',
|
'drives',
|
||||||
'driver',
|
'driver',
|
||||||
'e',
|
'e',
|
||||||
|
'embed',
|
||||||
|
'embed.js',
|
||||||
'email',
|
'email',
|
||||||
'emails',
|
'emails',
|
||||||
'error',
|
'error',
|
||||||
|
@ -182,6 +185,7 @@ class RestrictedNames
|
||||||
'invites',
|
'invites',
|
||||||
'import',
|
'import',
|
||||||
'imports',
|
'imports',
|
||||||
|
'index.php',
|
||||||
'j',
|
'j',
|
||||||
'js',
|
'js',
|
||||||
'k',
|
'k',
|
||||||
|
@ -280,6 +284,7 @@ class RestrictedNames
|
||||||
'whatsnew',
|
'whatsnew',
|
||||||
'whatnew',
|
'whatnew',
|
||||||
'whats-news',
|
'whats-news',
|
||||||
|
'web',
|
||||||
'ws',
|
'ws',
|
||||||
'wss',
|
'wss',
|
||||||
'www',
|
'www',
|
||||||
|
|
Loading…
Reference in a new issue