mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 10:12:53 +01:00
[fix] Add jinja raw block to so-common
This commit is contained in:
@@ -347,6 +347,8 @@ valid_int() {
|
|||||||
[[ $num =~ ^[0-9]*$ ]] && [[ $num -ge $min ]] && [[ $num -le $max ]] && return 0 || return 1
|
[[ $num =~ ^[0-9]*$ ]] && [[ $num -ge $min ]] && [[ $num -le $max ]] && return 0 || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# {% raw %}
|
||||||
|
|
||||||
valid_string() {
|
valid_string() {
|
||||||
local str=$1
|
local str=$1
|
||||||
local min_length=${2:-1}
|
local min_length=${2:-1}
|
||||||
@@ -355,6 +357,8 @@ valid_string() {
|
|||||||
echo "$str" | grep -qP '^\S+$' && [[ ${#str} -ge $min_length ]] && [[ ${#str} -le $max_length ]] && return 0 || return 1
|
echo "$str" | grep -qP '^\S+$' && [[ ${#str} -ge $min_length ]] && [[ ${#str} -le $max_length ]] && return 0 || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# {% endraw %}
|
||||||
|
|
||||||
valid_username() {
|
valid_username() {
|
||||||
local user=$1
|
local user=$1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user