Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Commit

Permalink
Issue 822: Setup: remove alphanumeric password requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
dougburks committed Oct 19, 2015
1 parent 7d7b6c9 commit 290cd6f
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 14 deletions.
21 changes: 7 additions & 14 deletions bin/sosetup
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ if [ $SERVER -eq 1 ]; then
while [ $SGUIL_CLIENT_PASSWORD_CONFIRMED = "no" ]; do
TEXT="What would you like to set your password to?\n\
\n\
Password must be at least 6 characters. Please use alphanumeric characters only!\n\
Password must be at least 6 characters.\n\
\n\
This password will be used for Sguil, Squert, and ELSA.\n\
\n\
Expand All @@ -327,20 +327,13 @@ Once you've logged into these interfaces using this initial password, you can ch
if [ "${#SGUIL_CLIENT_PASSWORD_1}" -lt "6" ]; then
zenity --error --text="Password must be at least 6 characters\!"
else
COMPRESSED="$(echo $SGUIL_CLIENT_PASSWORD_1 | sed -e 's/[^[:alnum:]]//g')"
if [ "$COMPRESSED" != "$SGUIL_CLIENT_PASSWORD_1" ] ; then
zenity --error --text="Invalid password\! \r \
\r \
Please use alphanumeric characters only."
TEXT="Please confirm what you would like to set your password to."
SGUIL_CLIENT_PASSWORD_2=`zenity --title="$TITLE" --text="$TEXT" --entry --hide-text`
[ "x$SGUIL_CLIENT_PASSWORD_2" = "x" ] && exit
if [ "$SGUIL_CLIENT_PASSWORD_1" = "$SGUIL_CLIENT_PASSWORD_2" ]; then
SGUIL_CLIENT_PASSWORD_CONFIRMED="yes"
else
TEXT="Please confirm what you would like to set your password to."
SGUIL_CLIENT_PASSWORD_2=`zenity --title="$TITLE" --text="$TEXT" --entry --hide-text`
[ "x$SGUIL_CLIENT_PASSWORD_2" = "x" ] && exit
if [ "$SGUIL_CLIENT_PASSWORD_1" = "$SGUIL_CLIENT_PASSWORD_2" ]; then
SGUIL_CLIENT_PASSWORD_CONFIRMED="yes"
else
zenity --error --text="Passwords didn't match\!"
fi
zenity --error --text="Passwords didn't match\!"
fi
fi
done
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
securityonion-setup (20120912-0ubuntu0securityonion166) trusty; urgency=medium

* Issue 822: Setup: remove alphanumeric password requirement

-- Doug Burks <doug.burks@gmail.com> Mon, 19 Oct 2015 16:11:07 -0400

securityonion-setup (20120912-0ubuntu0securityonion165) trusty; urgency=medium

* when asking for domain name, allow user to click Cancel to exit
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
securityonion-setup (20120912-0ubuntu0securityonion166) trusty; urgency=medium
.
* Issue 822: Setup: remove alphanumeric password requirement
Author: Doug Burks <doug.burks@gmail.com>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- securityonion-setup-20120912.orig/bin/sosetup
+++ securityonion-setup-20120912/bin/sosetup
@@ -317,7 +317,7 @@ if [ $SERVER -eq 1 ]; then
while [ $SGUIL_CLIENT_PASSWORD_CONFIRMED = "no" ]; do
TEXT="What would you like to set your password to?\n\
\n\
-Password must be at least 6 characters. Please use alphanumeric characters only!\n\
+Password must be at least 6 characters.\n\
\n\
This password will be used for Sguil, Squert, and ELSA.\n\
\n\
@@ -327,20 +327,13 @@ Once you've logged into these interfaces
if [ "${#SGUIL_CLIENT_PASSWORD_1}" -lt "6" ]; then
zenity --error --text="Password must be at least 6 characters\!"
else
- COMPRESSED="$(echo $SGUIL_CLIENT_PASSWORD_1 | sed -e 's/[^[:alnum:]]//g')"
- if [ "$COMPRESSED" != "$SGUIL_CLIENT_PASSWORD_1" ] ; then
- zenity --error --text="Invalid password\! \r \
-\r \
-Please use alphanumeric characters only."
+ TEXT="Please confirm what you would like to set your password to."
+ SGUIL_CLIENT_PASSWORD_2=`zenity --title="$TITLE" --text="$TEXT" --entry --hide-text`
+ [ "x$SGUIL_CLIENT_PASSWORD_2" = "x" ] && exit
+ if [ "$SGUIL_CLIENT_PASSWORD_1" = "$SGUIL_CLIENT_PASSWORD_2" ]; then
+ SGUIL_CLIENT_PASSWORD_CONFIRMED="yes"
else
- TEXT="Please confirm what you would like to set your password to."
- SGUIL_CLIENT_PASSWORD_2=`zenity --title="$TITLE" --text="$TEXT" --entry --hide-text`
- [ "x$SGUIL_CLIENT_PASSWORD_2" = "x" ] && exit
- if [ "$SGUIL_CLIENT_PASSWORD_1" = "$SGUIL_CLIENT_PASSWORD_2" ]; then
- SGUIL_CLIENT_PASSWORD_CONFIRMED="yes"
- else
- zenity --error --text="Passwords didn't match\!"
- fi
+ zenity --error --text="Passwords didn't match\!"
fi
fi
done
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,4 @@ Squert-is-now-is-varwwwsosquert
fix-HOME-issue-when-sensor-tries-to-ssh-copy-id-to-server
remove-snorby-from-sosetup.conf
when-asking-for-domain-name,-allow-user-to-click-Cancel-to-exit
Issue-822:-Setup:-remove-alphanumeric-password-requirement

0 comments on commit 290cd6f

Please sign in to comment.