# Password bug

**URL:** <https://www.ruby-forum.com/t/password-bug/91691>\
**Category:** Rails\
**Created:** [April 11, 2007, 5:14pm UTC](https://www.ruby-forum.com/t/password-bug/91691 "2007-04-11T17:14:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arthurfruchtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/22d042/32.png) [@arthurfruchtman](https://www.ruby-forum.com/u/arthurfruchtman)\
**Post date:** [April 11, 2007, 5:14pm UTC](https://www.ruby-forum.com/t/password-bug/91691/1 "2007-04-11T17:14:41Z")

</div>

I have a form where you sign up for an account on my RoR site. I have  
checks to make sure each text box has data in it. If I submit the form  
with all empty boxes, the page will be refreshed with errors (userID  
cannot be blank, email cannot be blank, etc.) Which is fine, but the  
password field is filled with asterisks. I think that its the encrypted  
‘blank’ password that shows up. How can I get it to be blank?

Thanks a lot  
Arthur

---

<div class="post-metadata">

**Author:** ![arthurfruchtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/22d042/32.png) [@arthurfruchtman](https://www.ruby-forum.com/u/arthurfruchtman)\
**Post date:** [December 14, 2007, 4:51pm UTC](https://www.ruby-forum.com/t/password-bug/91691/2 "2007-12-14T16:51:47Z")

</div>

I have the same problem. I have a registration, checking with  
validates\_confirmation\_of if the pwd and the pwd\_confirmation are the  
same. If not the pwd field is filled with stars!  
I want it to be blank too!

Rob

---

<div class="post-metadata">

**Author:** ![arthurfruchtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/22d042/32.png) [@arthurfruchtman](https://www.ruby-forum.com/u/arthurfruchtman)\
**Post date:** [December 14, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/password-bug/91691/3 "2007-12-14T17:23:47Z")

</div>

common thing, and you’re right, it’s the password content.  
two ways to solve that:

1. in controller set password to nil  
(and make sure later, that this does not lead to empty passwords being  
stored)

2. create an additional attr\_accessor :password\_input  
(like password\_confirmation)  
and make sure, that it’s stored in db

before\_save would be a good place to do that

---

<div class="post-metadata">

**Author:** ![arthurfruchtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/22d042/32.png) [@arthurfruchtman](https://www.ruby-forum.com/u/arthurfruchtman)\
**Post date:** [December 14, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/password-bug/91691/4 "2007-12-14T18:13:30Z")

</div>

thx thorsten

i just found the exact same articel…i just didn’t get to set the  
password in the controller to nil.  
i set the :value =\> “” it works fine too.  
How would i do that out of the controller?
