changeset 578:c064c7d357dc

Sanitize argument from cgi with numericalize()
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 15 Jun 2019 14:32:50 +0900
parents 67ecd5901590
children 6e727ab07c98
files s4-funcs.sh
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/s4-funcs.sh	Fri Jun 14 09:27:11 2019 +0900
+++ b/s4-funcs.sh	Sat Jun 15 14:32:50 2019 +0900
@@ -871,6 +871,9 @@
     return 1
   fi
 }
+numericalize() {
+  echo "${1%%[!0-9]*}"
+}
 encode() {
   if [ -z "$sha1" ]; then
     if type sha1 >/dev/null 2>&1; then

yatex.org