mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
improved user_validation
This commit is contained in:
parent
ed47fc3a9e
commit
fe0f39abc0
2 changed files with 2 additions and 1 deletions
|
@ -556,7 +556,7 @@ validate_format_email() {
|
||||||
|
|
||||||
# Username
|
# Username
|
||||||
validate_format_username() {
|
validate_format_username() {
|
||||||
if ! [[ "$1" =~ ^[0-Z]+(\.[0-Z]+)?$ ]] || [[ "${#1}" -gt 28 ]]; then
|
if ! [[ "$1" =~ ^[0-z]+(\.[0-z]+)?$ ]] || [[ "${#1}" -gt 28 ]]; then
|
||||||
echo "Error: $2 $1 is not valid"
|
echo "Error: $2 $1 is not valid"
|
||||||
log_event "$E_INVALID" "$EVENT"
|
log_event "$E_INVALID" "$EVENT"
|
||||||
exit $E_INVALID
|
exit $E_INVALID
|
||||||
|
|
|
@ -30,6 +30,7 @@ function top_panel($user, $TAB) {
|
||||||
exec ($command, $output, $return_var);
|
exec ($command, $output, $return_var);
|
||||||
if ( $return_var > 0 ) {
|
if ( $return_var > 0 ) {
|
||||||
header("Location: /error/");
|
header("Location: /error/");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
$panel = json_decode(implode('', $output), true);
|
$panel = json_decode(implode('', $output), true);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue