-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cleanup password after each login attempt #29
Conversation
@@ -58,6 +58,7 @@ Ember.SimpleAuth.LoginControllerMixin = Ember.Mixin.create({ | |||
login: function() { | |||
var self = this; | |||
var data = this.getProperties('identification', 'password'); | |||
self.set('password', ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe better set to undefined
sounds good; can you fix the build and add a test case? |
I'm not comfortable with PhantomJS testing yet and I can't run tests locally.
Any idea ? |
Hm, do you have PhantomJS installed? Also you could try running bundle exec rackup from the repository root and then open the URL it prints out in the browser and run the specs there. |
That's ok. I was using phantomjs installed by npm. Using the website bin works fine. |
About the broken test, I really don't understand why the overriden Could I clear the variable anywhere in the Did you already meet this behavior ? |
The problem is that if (!Ember.isEmpty(data.identification) && !Ember.isEmpty(data.password)) {
... is false. You'd need a testController.set('password', 'password'); before the 2nd invocation. Also, it would be better to only unset |
I've seen you've made the change. Thank you ! (I'll delete the branch). |
* update libraries * Remove unused "ember-welcome-page" addon * package.json: Add "mocha" script ... to fix CI builds
I've noticed that after a logout or unsuccessful login attempt, the password field wasn't empty when going back to the login page.
I think it is unsecure to keep the password in memory after a login attempt so I submit this PR that just cleanup the password variable (and bound form input).