devise icon indicating copy to clipboard operation
devise copied to clipboard

Adding duplicate data to reset_password_token

Open macpclinux opened this issue 12 years ago • 3 comments

I am using Devise on an Ubantu environment.

When requesting a reset email the system generates the reset_password_token and appends it to the request in the email fine as shown below:

href="http://our_private_system/users/password/edit?reset_password_token=WViq8_KXq4uejKzatjkd"

The request when sent back to devise presents the proper display to change the password but in the form I find that the reset_password_token has been duplicated as shown below:

input id="user_reset_password_token" name="user[reset_password_token]" value="WViq8_KXq4uejKzatjkd?reset_password_token=WViq8_KXq4uejKzatjkd"

As a result of the added "?reset_password_token=WViq8_KXq4uejKzatjkd" the originally created reset_password_token is not found in the database. I have manually removed the duplicate in the form using Firefox and the resulting post works fine.

DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"

*** LOCAL GEMS ***

actionmailer (4.0.4) actionpack (4.0.4) activemodel (4.0.4) activerecord (4.0.4) activerecord-deprecated_finders (1.0.3) activesupport (4.0.4) arel (4.0.2) atomic (1.1.16) bcrypt (3.1.7) builder (3.1.4) bundler (1.6.3, 1.2.3) coffee-rails (4.0.1) coffee-script (2.2.0) coffee-script-source (1.7.0) devise (3.2.4) erubis (2.7.0) execjs (2.2.1, 2.0.2) hike (1.2.3) i18n (0.6.9) jbuilder (1.5.3) journey (1.0.4) jquery-rails (3.1.1, 3.1.0) json (1.8.1) libv8 (3.16.14.3 x86_64-linux) mail (2.5.4) mime-types (1.25.1) minitest (4.7.5) multi_json (1.10.1, 1.9.2) orm_adapter (0.5.0) pg (0.17.1) polyglot (0.3.5, 0.3.4) rack (1.5.2) rack-test (0.6.2) rails (4.0.4) railties (4.0.4) rake (10.3.2, 10.1.1, 10.0.2) rdoc (4.1.1) ref (1.0.5) rubygems-bundler (1.1.0) rvm (1.11.3.5) sass (3.2.19, 3.2.17) sass-rails (4.0.3, 4.0.2) sdoc (0.4.0) sprockets (2.11.0) sprockets-rails (2.0.1) therubyracer (0.12.1) thor (0.19.1, 0.18.1) thread_safe (0.3.4, 0.3.1) tilt (1.4.1) treetop (1.4.15) turbolinks (2.2.2, 2.2.1) tzinfo (0.3.39) uglifier (2.5.1, 2.5.0) warden (1.2.3)

macpclinux avatar Jul 09 '14 13:07 macpclinux

Has this issue been reviewed yet?

macpclinux avatar Jul 10 '14 17:07 macpclinux

Hi Guys, Not sure if my previous comment made it through, but I had the same issue. In my case, it was my nginx rewrite rules working incorrectly and duplicating the reset_password_token parameter. Thanks, Rohan

rjerrems avatar Jul 21 '14 07:07 rjerrems

I have quit using devise and am not using my own authentication. No duplication and I can manage it myself.

macpclinux avatar Jul 21 '14 11:07 macpclinux