Bug Fix: Devise Checkbox TRUE VALUES not compatible with HTML specs (missing "on" value)

See:
* https://html.spec.whatwg.org/multipage/input.html#checkbox-state-(type%3Dcheckbox)
* https://html.spec.whatwg.org/multipage/input.html#dom-input-value-default-on

This issue causes the remember me functionality not to work correctly, especially when overriding the default styles as check boxes by default in all major browsers send the value `on` as required by the HTML specifications.

See also:

https://stackoverflow.com/questions/5987075/devise-remember-me-not-working-localhost-issue
This commit is contained in:
Itay Grudev
2024-11-08 18:13:05 +02:00
parent 12c796e499
commit 12f0dd1608

View File

@@ -60,7 +60,7 @@ module Devise
NO_INPUT = [] NO_INPUT = []
# True values used to check params # True values used to check params
TRUE_VALUES = [true, 1, '1', 't', 'T', 'true', 'TRUE'] TRUE_VALUES = [true, 1, '1', 'on', 'ON', 't', 'T', 'true', 'TRUE']
# Secret key used by the key generator # Secret key used by the key generator
mattr_accessor :secret_key mattr_accessor :secret_key