Skip to content

Commit

Permalink
Item2105: Make password questions less complex and frequent.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x00@5056 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
DrakeDiedrich authored and DrakeDiedrich committed Sep 20, 2009
1 parent 3bcb94e commit 6a3d1db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 41 deletions.
40 changes: 3 additions & 37 deletions core/tools/pkg/debian/config
Expand Up @@ -29,44 +29,10 @@ if [ "$RET" = "false" ]; then
db_get foswiki/adminuser
configuser="$RET"
db_subst "foswiki/adminpassword" "configuser" "$configuser"
db_subst "foswiki/adminpassword_again" "configuser" "$configuser"

pass_ok="false"
while [ "$pass_ok" != "true" ]; do
# Ask for password
# high : password must be typed-in
db_input high foswiki/adminpassword || [ $? -eq 30 ]

# Ask for password again
db_input high foswiki/adminpassword_again || [ $? -eq 30 ]
db_go

db_get foswiki/adminpassword
password="$RET"
db_get foswiki/adminpassword_again
password_again="$RET"

# If password are not equals, loop again
if [ "$password" != "$password_again" ]; then

# Reset the template used.
db_reset "foswiki/adminpassword" || true
db_fset "foswiki/adminpassword" "seen" "false" || true
db_reset "foswiki/adminpassword_again" || true
db_fset "foswiki/adminpassword_again" "seen" "false" || true
# Promt the user.
db_input critical "foswiki/password_mismatch" || true

# Loop again
continue
fi

pass_ok="true"

# attention, password is seen, but reset, so next time, must not compare again
db_reset foswiki/adminpassword_again
done

# Ask for password
# high : password must be typed-in
db_input high foswiki/adminpassword || [ $? -eq 30 ]
fi

# add info due to 3-4 bug reports
Expand Down
4 changes: 0 additions & 4 deletions core/tools/pkg/debian/postinst
Expand Up @@ -174,10 +174,6 @@ case "$1" in
chown -R $WIKI_OWNER.www-data /var/lib/foswiki/templates
chown -R $WIKI_OWNER.www-data /var/lib/foswiki/tools

# erase configuser password
db_reset "foswiki/adminpassword"
db_fset "foswiki/adminpassword" "seen" "false" || true

db_stop


Expand Down

0 comments on commit 6a3d1db

Please sign in to comment.