Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Improve settings-page UX

  • Loading branch information...
commit fd2cc0314933469345a8233133f27a67d274be98 1 parent 5d3789b
@amalloy amalloy authored
Showing with 5 additions and 2 deletions.
  1. +3 −1 resources/public/css/style.css
  2. +2 −1  src/foreclojure/settings.clj
4 resources/public/css/style.css
@@ -313,7 +313,9 @@ div#main {
div.message #flash-text {}
-div.message #error-text {}
+div.message #error-text {
+ color: red;
div#prob-title {
font-size: 15pt;
3  src/foreclojure/settings.clj
@@ -80,7 +80,8 @@
"New password must be at least seven characters long",
(= new-pwd repeat-pwd)
"New password was not entered identically twice"
- (.checkPassword encryptor old-pwd pwd)
+ (or (empty? new-pwd)
@amcnamara Owner

empty? new-pwd is redundant with line 79 (which itself is a redundant check because empty str has .length < 6)

@amalloy Owner
amalloy added a note

You're right about 79 itself being redundant, provided that new-pwd is never nil (I'm not sure if that's a safe assumption).

But we definitely do need the check here, because we are willing to accept an empty password - it signifies "no desire to change passwords". If we didn't have the empty? check then empty passwords would be checked against the DB, always failing; you would thus have to enter your password to get anything at all done here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ (.checkPassword encryptor old-pwd pwd))
"Current password incorrect"
(not (empty? email))
"Please enter a valid email address"]
Please sign in to comment.
Something went wrong with that request. Please try again.