I have the following code…
I use the standard code generate by script/generate scaffold …
def update
@ftpuser = Ftpuser.find(params[:id])
#
@ftpuser.Password = md5(@ftpuser.Password)
#
if @ftpuser.update_attributes(params[:ftpuser])
flash[:notice] = 'FTP-Benutzer erfolgreich akualisiert.'
redirect_to :action => 'show', :id => @ftpuser
else
render :action => 'edit'
end
.
.
end
def md5(passwort)
hash_class = Digest::MD5
@md5_passwort = hash_class.hexdigest(passwort)
end
My intention is to md5 the cleartext entered Password in a form -
but I have no access. The password is stored still in cleartext.
Any hints?
Thanx
–
Jochen