Skip to content
Snippets Groups Projects
Commit 2a6e8940 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

fix: escape dash in IP regex properly

parent cfa5ce51
Branches
No related tags found
No related merge requests found
......@@ -103,7 +103,7 @@ echo "SUCCESS: URL detection stage."
### IP address detection stage
# This is pretty basic regex matching, but it's a start.
IP_REGEX='[^:alpha:\-/][0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
IP_REGEX='[^a-zA-ZäöÜÄÖÜß/\\\-][0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
${GREP_CMD} ${GREP_EXCLUDES} -e "${IP_REGEX}" "${REPOPATH}" | grep -v "127.0.0"
if [[ ${?} -eq 0 ]]; then
echo "ERROR: found IP address."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment