rodauth 2.36.0 → 2.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rodauth/features/base.rb +15 -1
- data/lib/rodauth/features/change_login.rb +2 -2
- data/lib/rodauth/features/create_account.rb +2 -2
- data/lib/rodauth/features/email_auth.rb +1 -1
- data/lib/rodauth/features/internal_request.rb +4 -4
- data/lib/rodauth/features/json.rb +5 -0
- data/lib/rodauth/features/jwt.rb +5 -9
- data/lib/rodauth/features/lockout.rb +1 -1
- data/lib/rodauth/features/login.rb +1 -1
- data/lib/rodauth/features/login_password_requirements_base.rb +13 -0
- data/lib/rodauth/features/reset_password.rb +1 -1
- data/lib/rodauth/features/two_factor_base.rb +6 -13
- data/lib/rodauth/features/verify_account.rb +2 -2
- data/lib/rodauth/features/webauthn_autofill.rb +2 -1
- data/lib/rodauth/features/webauthn_login.rb +1 -1
- data/lib/rodauth/version.rb +1 -1
- data/lib/rodauth.rb +6 -2
- metadata +3 -258
- data/CHANGELOG +0 -521
- data/README.rdoc +0 -1555
- data/doc/account_expiration.rdoc +0 -41
- data/doc/active_sessions.rdoc +0 -56
- data/doc/argon2.rdoc +0 -54
- data/doc/audit_logging.rdoc +0 -44
- data/doc/base.rdoc +0 -123
- data/doc/change_login.rdoc +0 -25
- data/doc/change_password.rdoc +0 -26
- data/doc/change_password_notify.rdoc +0 -14
- data/doc/close_account.rdoc +0 -26
- data/doc/confirm_password.rdoc +0 -32
- data/doc/create_account.rdoc +0 -27
- data/doc/disallow_common_passwords.rdoc +0 -17
- data/doc/disallow_password_reuse.rdoc +0 -30
- data/doc/email_auth.rdoc +0 -55
- data/doc/email_base.rdoc +0 -18
- data/doc/error_reasons.rdoc +0 -77
- data/doc/guides/admin_activation.rdoc +0 -46
- data/doc/guides/already_authenticated.rdoc +0 -10
- data/doc/guides/alternative_login.rdoc +0 -46
- data/doc/guides/change_table_and_column_names.rdoc +0 -19
- data/doc/guides/create_account_programmatically.rdoc +0 -38
- data/doc/guides/delay_password.rdoc +0 -25
- data/doc/guides/email_only.rdoc +0 -16
- data/doc/guides/i18n.rdoc +0 -29
- data/doc/guides/internals.rdoc +0 -233
- data/doc/guides/links.rdoc +0 -12
- data/doc/guides/login_return.rdoc +0 -37
- data/doc/guides/migrate_password_hash_algorithm.rdoc +0 -15
- data/doc/guides/password_column.rdoc +0 -25
- data/doc/guides/password_confirmation.rdoc +0 -37
- data/doc/guides/password_requirements.rdoc +0 -43
- data/doc/guides/paths.rdoc +0 -51
- data/doc/guides/query_params.rdoc +0 -9
- data/doc/guides/redirects.rdoc +0 -17
- data/doc/guides/registration_field.rdoc +0 -68
- data/doc/guides/render_confirmation.rdoc +0 -17
- data/doc/guides/require_mfa.rdoc +0 -30
- data/doc/guides/reset_password_autologin.rdoc +0 -21
- data/doc/guides/share_configuration.rdoc +0 -34
- data/doc/guides/status_column.rdoc +0 -28
- data/doc/guides/totp_or_recovery.rdoc +0 -16
- data/doc/http_basic_auth.rdoc +0 -18
- data/doc/internal_request.rdoc +0 -539
- data/doc/json.rdoc +0 -56
- data/doc/jwt.rdoc +0 -52
- data/doc/jwt_cors.rdoc +0 -22
- data/doc/jwt_refresh.rdoc +0 -58
- data/doc/lockout.rdoc +0 -73
- data/doc/login.rdoc +0 -39
- data/doc/login_password_requirements_base.rdoc +0 -44
- data/doc/logout.rdoc +0 -22
- data/doc/otp.rdoc +0 -93
- data/doc/otp_lockout_email.rdoc +0 -30
- data/doc/otp_modify_email.rdoc +0 -19
- data/doc/otp_unlock.rdoc +0 -58
- data/doc/password_complexity.rdoc +0 -34
- data/doc/password_expiration.rdoc +0 -38
- data/doc/password_grace_period.rdoc +0 -24
- data/doc/password_pepper.rdoc +0 -52
- data/doc/path_class_methods.rdoc +0 -10
- data/doc/recovery_codes.rdoc +0 -61
- data/doc/release_notes/1.0.0.txt +0 -443
- data/doc/release_notes/1.1.0.txt +0 -8
- data/doc/release_notes/1.10.0.txt +0 -80
- data/doc/release_notes/1.11.0.txt +0 -32
- data/doc/release_notes/1.12.0.txt +0 -61
- data/doc/release_notes/1.13.0.txt +0 -34
- data/doc/release_notes/1.14.0.txt +0 -19
- data/doc/release_notes/1.15.0.txt +0 -21
- data/doc/release_notes/1.16.0.txt +0 -31
- data/doc/release_notes/1.17.0.txt +0 -23
- data/doc/release_notes/1.18.0.txt +0 -26
- data/doc/release_notes/1.19.0.txt +0 -116
- data/doc/release_notes/1.2.0.txt +0 -18
- data/doc/release_notes/1.20.0.txt +0 -175
- data/doc/release_notes/1.21.0.txt +0 -12
- data/doc/release_notes/1.22.0.txt +0 -11
- data/doc/release_notes/1.23.0.txt +0 -32
- data/doc/release_notes/1.3.0.txt +0 -21
- data/doc/release_notes/1.4.0.txt +0 -11
- data/doc/release_notes/1.5.0.txt +0 -74
- data/doc/release_notes/1.6.0.txt +0 -37
- data/doc/release_notes/1.7.0.txt +0 -6
- data/doc/release_notes/1.8.0.txt +0 -14
- data/doc/release_notes/1.9.0.txt +0 -15
- data/doc/release_notes/2.0.0.txt +0 -361
- data/doc/release_notes/2.1.0.txt +0 -31
- data/doc/release_notes/2.10.0.txt +0 -47
- data/doc/release_notes/2.11.0.txt +0 -31
- data/doc/release_notes/2.12.0.txt +0 -17
- data/doc/release_notes/2.13.0.txt +0 -19
- data/doc/release_notes/2.14.0.txt +0 -17
- data/doc/release_notes/2.15.0.txt +0 -48
- data/doc/release_notes/2.16.0.txt +0 -20
- data/doc/release_notes/2.17.0.txt +0 -10
- data/doc/release_notes/2.18.0.txt +0 -27
- data/doc/release_notes/2.19.0.txt +0 -61
- data/doc/release_notes/2.2.0.txt +0 -39
- data/doc/release_notes/2.20.0.txt +0 -10
- data/doc/release_notes/2.21.0.txt +0 -28
- data/doc/release_notes/2.22.0.txt +0 -43
- data/doc/release_notes/2.23.0.txt +0 -15
- data/doc/release_notes/2.24.0.txt +0 -15
- data/doc/release_notes/2.25.0.txt +0 -8
- data/doc/release_notes/2.26.0.txt +0 -45
- data/doc/release_notes/2.27.0.txt +0 -35
- data/doc/release_notes/2.28.0.txt +0 -16
- data/doc/release_notes/2.29.0.txt +0 -27
- data/doc/release_notes/2.3.0.txt +0 -37
- data/doc/release_notes/2.30.0.txt +0 -15
- data/doc/release_notes/2.31.0.txt +0 -47
- data/doc/release_notes/2.32.0.txt +0 -65
- data/doc/release_notes/2.33.0.txt +0 -18
- data/doc/release_notes/2.34.0.txt +0 -36
- data/doc/release_notes/2.35.0.txt +0 -22
- data/doc/release_notes/2.36.0.txt +0 -35
- data/doc/release_notes/2.4.0.txt +0 -22
- data/doc/release_notes/2.5.0.txt +0 -20
- data/doc/release_notes/2.6.0.txt +0 -37
- data/doc/release_notes/2.7.0.txt +0 -33
- data/doc/release_notes/2.8.0.txt +0 -20
- data/doc/release_notes/2.9.0.txt +0 -21
- data/doc/remember.rdoc +0 -79
- data/doc/reset_password.rdoc +0 -66
- data/doc/reset_password_notify.rdoc +0 -17
- data/doc/session_expiration.rdoc +0 -28
- data/doc/single_session.rdoc +0 -37
- data/doc/sms_codes.rdoc +0 -138
- data/doc/two_factor_base.rdoc +0 -70
- data/doc/update_password_hash.rdoc +0 -7
- data/doc/verify_account.rdoc +0 -67
- data/doc/verify_account_grace_period.rdoc +0 -19
- data/doc/verify_login_change.rdoc +0 -59
- data/doc/webauthn.rdoc +0 -118
- data/doc/webauthn_autofill.rdoc +0 -19
- data/doc/webauthn_login.rdoc +0 -16
- data/doc/webauthn_modify_email.rdoc +0 -19
- data/doc/webauthn_verify_account.rdoc +0 -9
@@ -1,61 +0,0 @@
|
|
1
|
-
= Security Fix
|
2
|
-
|
3
|
-
* The password reset key deadline was previously ignored when
|
4
|
-
checking for a password reset key. This allowed expired keys to
|
5
|
-
be used. This problem exists in all previous versions.
|
6
|
-
|
7
|
-
The root cause of this issue is that support for deadline checking
|
8
|
-
was not previously implemented. In previous versions, the deadline
|
9
|
-
was only used to remove old keys when creating a new key.
|
10
|
-
|
11
|
-
Rodauth only allows a single password reset key per account, and
|
12
|
-
deletes password reset keys when passwords are reset. So if the
|
13
|
-
user had subsequently generated a different password reset key, or
|
14
|
-
had already used the password reset key to reset the password,
|
15
|
-
then they would not be vulnerable. The most likely situation
|
16
|
-
where there exists a vulnerability due to this issue is:
|
17
|
-
|
18
|
-
* A user requests a password reset.
|
19
|
-
* They do not reset their password or request another
|
20
|
-
password reset.
|
21
|
-
* The password reset key deadline expires.
|
22
|
-
* An attacker gets access to their archived email containing
|
23
|
-
the password reset link, which they use to reset the
|
24
|
-
password for the account.
|
25
|
-
|
26
|
-
Reporting Details:
|
27
|
-
|
28
|
-
* Initially reported on 10/3/2017
|
29
|
-
* Fixed in repository on 10/3/2017
|
30
|
-
* Version 1.12.0 released with fix on 10/3/2017
|
31
|
-
|
32
|
-
Thanks to Chris Hanks for discovering and reporting this issue
|
33
|
-
and supplying an initial fix.
|
34
|
-
|
35
|
-
= New Features
|
36
|
-
|
37
|
-
* The http_basic_auth feature now supports a
|
38
|
-
require_http_basic_auth configuration method. When set to true,
|
39
|
-
if authentication is required and the request is not already
|
40
|
-
authenticated, they will get a 401 response instead of a
|
41
|
-
redirect to the login page.
|
42
|
-
|
43
|
-
* All of the following Rodauth migration methods now support an
|
44
|
-
options hash:
|
45
|
-
|
46
|
-
* Rodauth.drop_database_authentication_functions
|
47
|
-
* Rodauth.create_database_previous_password_check_functions
|
48
|
-
* Rodauth.drop_database_previous_password_check_functions
|
49
|
-
|
50
|
-
These options allow you to customize the get_salt_name and
|
51
|
-
valid_hash_name database functions, as well as set the the table
|
52
|
-
for the previous_password_check_functions.
|
53
|
-
|
54
|
-
* A :search_path option is now supported when using the following
|
55
|
-
Rodauth migration methods on PostgreSQL:
|
56
|
-
|
57
|
-
* Rodauth.create_database_authentication_functions
|
58
|
-
* Rodauth.drop_database_authentication_functions
|
59
|
-
|
60
|
-
This sets the search_path to use inside the function. For
|
61
|
-
backwards compatibility, it defaults to 'public, pg_temp'.
|
@@ -1,34 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* A cache_templates configuration method has been added, which can be
|
4
|
-
set to false to disable the default caching of templates. The main
|
5
|
-
time you would want to use this is if you were overriding Rodauth's
|
6
|
-
templates with your own templates and modifying such templates in
|
7
|
-
development mode. If that is the case, you may want to use
|
8
|
-
something like:
|
9
|
-
|
10
|
-
cache_templates(ENV['RACK_ENV'] != 'development')
|
11
|
-
|
12
|
-
* An invalid_previous_password_message configuration method has been
|
13
|
-
added to the change_password feature, which overrides the default
|
14
|
-
invalid_password_message configuration method if the incorrect
|
15
|
-
previous password is used when changing the password. This is
|
16
|
-
designed for use when invalid_password_message has been overridden
|
17
|
-
and the message doesn't make sense in the change password case.
|
18
|
-
|
19
|
-
* A json_response_body(hash) configuration method has been added to
|
20
|
-
the jwt feature, allowing for custom formatting of the JSON
|
21
|
-
response body. This is called with the hash to use in the
|
22
|
-
response, and should return a JSON-formatted string. Example:
|
23
|
-
|
24
|
-
json_response_body do |hash|
|
25
|
-
super('status'=>response.status, 'detail'=>hash)
|
26
|
-
end
|
27
|
-
|
28
|
-
= Other Improvements
|
29
|
-
|
30
|
-
* In the jwt feature, if json_response_custom_error_status? is set to
|
31
|
-
true, custom error statuses will be used if only_json? is set to
|
32
|
-
true, even if the request is not in JSON format. Previously,
|
33
|
-
custom error statuses were only used if the request was in JSON
|
34
|
-
format.
|
@@ -1,19 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* A change_password_notify feature has been added, which emails the
|
4
|
-
user when the change_password feature is used to change their
|
5
|
-
password. This can alert the user when their password may have
|
6
|
-
been changed without their knowledge.
|
7
|
-
|
8
|
-
= Other Improvements
|
9
|
-
|
10
|
-
* When using the account_expiration feature with the reset_password
|
11
|
-
feature, resetting the passwords for expired accounts is no longer
|
12
|
-
allowed. Note that the previous behavior isn't considered a
|
13
|
-
security issue, because even after resetting their password,
|
14
|
-
expired accounts could not login.
|
15
|
-
|
16
|
-
* When using the account_expiration feature with the lockout feature,
|
17
|
-
unlocking expired accounts is no longer allowed. Note that the
|
18
|
-
previous behavior isn't considered a security issue, because even
|
19
|
-
after unlocking the account, expired accounts could not login.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* create_account_set_password? and verify_account_set_password?
|
4
|
-
configuration methods have been added to the create_account and
|
5
|
-
verify_account features. Setting:
|
6
|
-
|
7
|
-
verify_account_set_password? true
|
8
|
-
|
9
|
-
in your rodauth configuration will change Rodauth so that instead
|
10
|
-
of asking for a password on the create account form, it will ask for
|
11
|
-
a password on the verify account form.
|
12
|
-
|
13
|
-
This can fix a possible issue where an attacker creates an account
|
14
|
-
for a user with a password the attacker knows. If the user clicks
|
15
|
-
on the link in the verify account email and clicks on the button on
|
16
|
-
the verify account page, the attacker would have have a verified
|
17
|
-
account that they know the password to.
|
18
|
-
|
19
|
-
By setting verify_account_set_password? to true, you can ensure that
|
20
|
-
only the user who has access to the email can enter the password for
|
21
|
-
the account.
|
@@ -1,31 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* A disallow_common_passwords feature has been added. This feature
|
4
|
-
by default will disallow the 10,000 most common passwords:
|
5
|
-
|
6
|
-
enable :disallow_common_passwords
|
7
|
-
|
8
|
-
You can supply your own file containing common passwords separated
|
9
|
-
by newlines ("\n"):
|
10
|
-
|
11
|
-
most_common_passwords_file '/path/to/file'
|
12
|
-
|
13
|
-
You can also supply a password dictionary directly as any object
|
14
|
-
that responds to include?:
|
15
|
-
|
16
|
-
most_common_passwords some_password_dictionary_object
|
17
|
-
|
18
|
-
The reason only the 10,000 most common passwords are used by
|
19
|
-
default is larger password files would significantly bloat the
|
20
|
-
size of the gem. Also, because the most common passwords are kept
|
21
|
-
in memory by default for performance reasons, larger password
|
22
|
-
files can bloat the memory usage of the process (the
|
23
|
-
disallow_common_passwords feature should use around 500KB of
|
24
|
-
memory by default). For very large password dictionaries,
|
25
|
-
consider using a custom object that does not keep all common
|
26
|
-
passwords in memory.
|
27
|
-
|
28
|
-
= Other Improvements
|
29
|
-
|
30
|
-
* Rodauth no longer uses the Rack::Request#[] method to get
|
31
|
-
parameter values. This method is deprecated in Rack 2.
|
@@ -1,23 +0,0 @@
|
|
1
|
-
= Improvements
|
2
|
-
|
3
|
-
* Support has been added for using Roda's route_csrf plugin with
|
4
|
-
request-specific CSRF tokens. When loading the Rodauth into
|
5
|
-
your Roda app, specify the :csrf=>:route_csrf plugin option
|
6
|
-
so that Rodauth will load the route_csrf plugin instead of
|
7
|
-
the csrf plugin.
|
8
|
-
|
9
|
-
* The use_request_specific_csrf_tokens? configuration option
|
10
|
-
has been added, it defaults to true when the the
|
11
|
-
:csrf=>:route_csrf option is used when loading the plugin.
|
12
|
-
|
13
|
-
* If you have custom templates for the reset password request,
|
14
|
-
unlock account request, or verify account resend link
|
15
|
-
request, you will have to update them to use the new
|
16
|
-
request-specific CSRF token feature.
|
17
|
-
|
18
|
-
= Backwards Compatibility
|
19
|
-
|
20
|
-
* The csrf_tag configuration method now accepts the path as
|
21
|
-
an optional argument, previously it accepted no arguments.
|
22
|
-
The optional argument defaults to the path of the current
|
23
|
-
request.
|
@@ -1,26 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* flash_error_key and flash_notice_key configuration methods have
|
4
|
-
been added for setting the keys used in the flash hash.
|
5
|
-
|
6
|
-
* A confirm_password_redirect_session_key configuration method was
|
7
|
-
added for configuring the session key used for storing the
|
8
|
-
confirm password redirect.
|
9
|
-
|
10
|
-
= Other Improvements
|
11
|
-
|
12
|
-
* Support for the new Roda sessions plugin has been added. Rodauth
|
13
|
-
now recognizes the :sessions_convert_symbols Roda application option
|
14
|
-
and will default to using string keys instead of symbol keys for
|
15
|
-
session and flash values if the application option is set.
|
16
|
-
|
17
|
-
= Backwards Compatibility
|
18
|
-
|
19
|
-
* If the :sessions_convert_symbols Roda application option is used,
|
20
|
-
and the jwt feature is used and the jwt_symbolize_deeply?
|
21
|
-
configuration method is not used, then the session data will not
|
22
|
-
have the top-level data converted to symbols.
|
23
|
-
|
24
|
-
* If the Roda application defines a clear_session method in the scope,
|
25
|
-
that method is now called by Rodauth to clear the session data. This
|
26
|
-
is for better integration with the Roda sessions plugin.
|
@@ -1,116 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* An email_auth feature has been added, which allows passwordless
|
4
|
-
logins using links sent via email. This allows usage without any
|
5
|
-
password storage. If the user does not have a password, when they
|
6
|
-
submit their login, they are sent a link via email. If the user
|
7
|
-
has a password, they have the option of either entering their
|
8
|
-
password or being sent a link via email.
|
9
|
-
|
10
|
-
* A use_multi_phase_login? configuration method has been added. If
|
11
|
-
this configuration method is set to true, a two-phase login is used,
|
12
|
-
which the login form only has a field for a user's login. After the
|
13
|
-
login form has been submitted (assuming there is a valid login), a
|
14
|
-
form is displayed with a field for the password.
|
15
|
-
|
16
|
-
* Optional email rate limiting is now supported in the lockout,
|
17
|
-
reset_password, and verify_account features, using the following
|
18
|
-
configuration methods:
|
19
|
-
|
20
|
-
* account_lockouts_email_last_sent_column
|
21
|
-
* reset_password_email_last_sent_column
|
22
|
-
* verify_account_email_last_sent_column
|
23
|
-
|
24
|
-
These methods are nil by default. To enable rate limiting, set
|
25
|
-
these to a symbol representing the column name in the appropriate
|
26
|
-
table. The recommended column name is email_last_sent. To use
|
27
|
-
this feature, you'll have to add this column to the appropriate
|
28
|
-
tables:
|
29
|
-
|
30
|
-
DB.add_column :account_lockouts, :email_last_sent, DateTime
|
31
|
-
DB.add_column :account_password_reset_keys, :email_last_sent, DateTime,
|
32
|
-
:null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
33
|
-
DB.add_column :account_verification_keys, :email_last_sent, DateTime,
|
34
|
-
:null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
35
|
-
|
36
|
-
When this support is enabled, by default Rodauth will not send
|
37
|
-
an email if an email has been sent within the last 5 minutes. You
|
38
|
-
can change this time period using the following configuration
|
39
|
-
methods, which take the number of seconds that must have elapsed
|
40
|
-
before sending another email:
|
41
|
-
|
42
|
-
* unlock_account_skip_resend_email_within
|
43
|
-
* reset_password_skip_resend_email_within
|
44
|
-
* verify_account_skip_resend_email_within
|
45
|
-
|
46
|
-
The new email_auth feature also supports email rate limiting, and
|
47
|
-
because there are no backwards compatibility issues, the support
|
48
|
-
is enabled by default.
|
49
|
-
|
50
|
-
* An after_account_lockout configuration method has been added,
|
51
|
-
which is called directly after locking out an account. This can
|
52
|
-
be useful for audit logging.
|
53
|
-
|
54
|
-
* A default_post_email_redirect configuration has been added, which
|
55
|
-
sets the default for all redirects after emailing if the account
|
56
|
-
is not currently logged in. Each individual feature that emails
|
57
|
-
still supports the appropriate *_redirect configuration method
|
58
|
-
for specifying behavior for that feature.
|
59
|
-
|
60
|
-
* A verify_login_change_duplicate_account_redirect configuration
|
61
|
-
method has been added for where to redirect if a user attempts
|
62
|
-
a login change where the new proposed login already exists.
|
63
|
-
|
64
|
-
* before_verify_login_change_email and after_verify_login_change_email
|
65
|
-
configuration methods have been added for executing code before
|
66
|
-
or after the verify login change email is sent.
|
67
|
-
|
68
|
-
= Other Improvements
|
69
|
-
|
70
|
-
* When using the verify_login_change feature, Rodauth now checks
|
71
|
-
that the new login is not already taken and fails in a more
|
72
|
-
graceful manner. Previously, Rodauth would not report an
|
73
|
-
error when the login change was requested, and would raise an
|
74
|
-
exception when attempting to verify the login change due to the
|
75
|
-
violation of a uniqueness constraint.
|
76
|
-
|
77
|
-
* Rodauth now avoids unnecessary database queries when using the
|
78
|
-
two factor authentication support and the following methods:
|
79
|
-
|
80
|
-
* authenticated?
|
81
|
-
* require_authentication
|
82
|
-
* require_two_factor_setup
|
83
|
-
|
84
|
-
* The otp-setup template now looks nicer when using both Bootstrap
|
85
|
-
3 and 4, especially on small screens such as phones.
|
86
|
-
|
87
|
-
* If the database_type was not MySQL, the lockout, remember, and
|
88
|
-
reset_password features no longer disable the requiring of the
|
89
|
-
date_arithmetic Sequel extension if another feature that
|
90
|
-
requires the extension is used.
|
91
|
-
|
92
|
-
* On MySQL, the rodauth_get_salt database function definition now
|
93
|
-
handles accounts without passwords. If you previously added the
|
94
|
-
database function and want to support accounts without passwords,
|
95
|
-
then you should drop the function and re-add it via:
|
96
|
-
|
97
|
-
Rodauth.drop_database_authentication_functions(DB)
|
98
|
-
Rodauth.create_database_authentication_functions(DB)
|
99
|
-
|
100
|
-
Note that MySQL does not support CREATE OR REPLACE FUNCTION, so
|
101
|
-
you have to drop the function and then create it, which will
|
102
|
-
temporarily result in the function not being defined.
|
103
|
-
|
104
|
-
= Backwards Compatibility
|
105
|
-
|
106
|
-
* The before_otp_authentication_route configuration method is
|
107
|
-
deprecated, please switch to before_otp_auth_route instead. This
|
108
|
-
change is made so that before_*_route method names are consistent
|
109
|
-
with the route name.
|
110
|
-
|
111
|
-
* The verify_account_email_sent_redirect configuration method now
|
112
|
-
defaults to / instead of /login. If you were previously not
|
113
|
-
setting this configuration method and would like it to default to
|
114
|
-
/login, you will now have to force the setting:
|
115
|
-
|
116
|
-
verify_account_email_sent_redirect '/login'
|
data/doc/release_notes/1.2.0.txt
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* An otp_drift configuration method has been added to the otp plugin,
|
4
|
-
which allows you to set the number of seconds of allowed drift. This
|
5
|
-
makes the otp plugin easier to use if the client and server do not
|
6
|
-
have good synchronize to the same time source.
|
7
|
-
|
8
|
-
= Other Improvements
|
9
|
-
|
10
|
-
* Passwords containing the ASCII NUL character "\0" are no longer
|
11
|
-
allowed, as bcrypt truncates the password at the first NUL
|
12
|
-
character.
|
13
|
-
|
14
|
-
Note that bcrypt only uses the first 72 characters of the password
|
15
|
-
when constructing the hash, but Rodauth does not enforce a limit
|
16
|
-
of 72 characters. If you want to enforce a maximum password length
|
17
|
-
in your application, use the password_meets_requirements?
|
18
|
-
configuration method with a block and call super inside the block.
|
@@ -1,175 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* An hmac_secret configuration method has been added. If set,
|
4
|
-
Rodauth will use HMACs for all of the tokens that Rodauth creates.
|
5
|
-
By using HMACs for the tokens, even if the database storing the
|
6
|
-
tokens is compromised (e.g. via an SQL injection vulnerability), the
|
7
|
-
tokens stored in the database will not be usable without knowledge
|
8
|
-
of the HMAC secret.
|
9
|
-
|
10
|
-
The following features are affected by setting the hmac_secret
|
11
|
-
configuration method:
|
12
|
-
|
13
|
-
* email_auth
|
14
|
-
* lockout
|
15
|
-
* otp
|
16
|
-
* remember
|
17
|
-
* reset_password
|
18
|
-
* single_session
|
19
|
-
* verify_account
|
20
|
-
* verify_login_change
|
21
|
-
|
22
|
-
To allow for graceful transition when adding hmac_secret to an
|
23
|
-
existing Rodauth installation, you can use the
|
24
|
-
allow_raw_email_token? configuration method to keep allowing
|
25
|
-
raw tokens. However, you should remove the allow_raw_email_token?
|
26
|
-
setting after the existing tokens have expired (most tokens expire
|
27
|
-
after 1 day by default). Verify account tokens do not expire,
|
28
|
-
but users can request a new verify account token if their token has
|
29
|
-
expired.
|
30
|
-
|
31
|
-
For remember tokens, the raw_remember_token_deadline configuration
|
32
|
-
method can be used, which will only allow the use of raw remember
|
33
|
-
tokens before the given deadline, which should be the time in the
|
34
|
-
future when you want to no longer accept raw remember tokens. You
|
35
|
-
can remove this configuration method after the deadline has passed.
|
36
|
-
By default, the deadline should be set to 14 days after the time
|
37
|
-
you enable hmac_secret, since remember tokens expire in 14 days by
|
38
|
-
default.
|
39
|
-
|
40
|
-
Similarly, in the single_session feature, you can use the
|
41
|
-
allow_raw_single_session_key? configuration method to allow raw
|
42
|
-
single session keys.
|
43
|
-
|
44
|
-
In the otp feature, you cannot mix HMAC and non-HMAC tokens. If
|
45
|
-
the hmac_secret setting is enabled and there are any existing
|
46
|
-
otp tokens already setup, they will stop working. If you are
|
47
|
-
already using the otp feature and would like to use the hmac_secret
|
48
|
-
configuration method, you need to set the otp_keys_use_hmac?
|
49
|
-
configuration method to false unless you want to invalidate all
|
50
|
-
existing otp tokens.
|
51
|
-
|
52
|
-
The hmac_secret configuration is also used during OTP setup
|
53
|
-
in the otp feature, to ensure that the OTP secrets for two factor
|
54
|
-
authentication came from the server and were not modified by the
|
55
|
-
user. If hmac_secret is used, setting up OTP via JSON requires
|
56
|
-
sending a POST request to the otp-setup route. This request will
|
57
|
-
fail, but included in the response will be the OTP secret and raw
|
58
|
-
OTP secret to use. Submitting a POST request including the OTP
|
59
|
-
secret and raw OTP secret will allow OTP setup to complete.
|
60
|
-
|
61
|
-
* A jwt_refresh feature has been added. This uses the jwt feature,
|
62
|
-
and issuing short-lived JWTs with exp, iat, and nbf claims, with a
|
63
|
-
database-backed refresh token for issuing another short-lived JWT.
|
64
|
-
The refresh tokens will automatically use HMACs if the hmac_secret
|
65
|
-
configuration method is set.
|
66
|
-
|
67
|
-
* Rodauth's handling of form errors is now accessible by default.
|
68
|
-
aria-invalid attributes are now used on all input fields with
|
69
|
-
errors, and aria-describedby attributes are used to tie the input
|
70
|
-
fields to the error messages.
|
71
|
-
|
72
|
-
* All hard coded strings are now overridable via configuration
|
73
|
-
methods, with the following configuration methods added:
|
74
|
-
|
75
|
-
* lockout feature
|
76
|
-
* unlock_account_explanatory_text
|
77
|
-
* unlock_account_request_explanatory_text
|
78
|
-
* login_password_requirements_base feature
|
79
|
-
* already_an_account_with_this_login_message
|
80
|
-
* otp feature
|
81
|
-
* otp_provisioning_uri_label
|
82
|
-
* otp_secret_label
|
83
|
-
* recovery_codes feature
|
84
|
-
* add_recovery_codes_heading
|
85
|
-
* reset_password feature
|
86
|
-
* reset_password_explanatory_text
|
87
|
-
* verify_account feature
|
88
|
-
* verify_account_resend_explanatory_text
|
89
|
-
|
90
|
-
* The following configuration methods have been added to the base
|
91
|
-
feature, related to customization of input fields in Rodauth forms:
|
92
|
-
|
93
|
-
default_field_attributes :: The default attributes to use for input
|
94
|
-
field tags, if field_attributes does not
|
95
|
-
handle the field.
|
96
|
-
field_attributes(field) :: The attributes to use for input fields
|
97
|
-
with the given parameter name.
|
98
|
-
field_error_attributes(field) :: The attributes to use for input
|
99
|
-
fields with the given parameter
|
100
|
-
name if the field has an error.
|
101
|
-
formatted_field_error(field, error) :: HTML to use for the given
|
102
|
-
parameter name and error
|
103
|
-
text. Uses a span by
|
104
|
-
default.
|
105
|
-
input_field_error_class :: The CSS class to add for input fields
|
106
|
-
with errors.
|
107
|
-
input_field_error_message_class :: The CSS class to add for error
|
108
|
-
message spans.
|
109
|
-
input_field_label_suffix :: Adds suffix to all input field labels
|
110
|
-
login_input_type :: The input type to use for login fields.
|
111
|
-
Defaults to text, but can be set to email,
|
112
|
-
though that is currently a bad idea if you
|
113
|
-
want the login fields to have accessible error
|
114
|
-
handling.
|
115
|
-
mark_input_fields_as_required? :: Whether to mark all input fields
|
116
|
-
as required by default. Note that
|
117
|
-
this is currently a bad idea if
|
118
|
-
you want the fields to have
|
119
|
-
accessible error handling.
|
120
|
-
|
121
|
-
= Other Improvements
|
122
|
-
|
123
|
-
* rotp 5 is now supported in the otp feature. Previous rotp versions
|
124
|
-
down to rotp 2.1.1 remain supported.
|
125
|
-
|
126
|
-
* Performance of Rodauth routes has been improved by using defined
|
127
|
-
methods instead of instance_exec for route dispatching. Internal
|
128
|
-
unnecessary uses of instance_exec have also been removed for
|
129
|
-
performance reasons.
|
130
|
-
|
131
|
-
* When the disallow_password_reuse feature is used without the
|
132
|
-
verify_account feature, and account_password_hash_column
|
133
|
-
configuration is not used, Rodauth no longer tries to call a method
|
134
|
-
that does not exist.
|
135
|
-
|
136
|
-
* When using the disallow_password_reuse and verify_account features,
|
137
|
-
with verify_account_set_password? set to true, Rodauth skips adding
|
138
|
-
an empty password to the list of previous passwords.
|
139
|
-
|
140
|
-
* Rodauth now avoids an unnecessary DELETE query in the
|
141
|
-
disallow_password_reuse feature if there are no previous passwords.
|
142
|
-
|
143
|
-
* The otp-auth-code field now has an autocomplete=off attribute.
|
144
|
-
|
145
|
-
* On Ruby 1.8, new tokens now use URL safe base64 encoding, instead
|
146
|
-
of hex encoding. Rodauth has always used URL safe base64 encoding
|
147
|
-
for new tokens on Ruby 1.9+.
|
148
|
-
|
149
|
-
= Backwards Compatibility
|
150
|
-
|
151
|
-
* The following configuration methods have been renamed:
|
152
|
-
|
153
|
-
* email_auth feature
|
154
|
-
* no_matching_email_auth_key_message =>
|
155
|
-
no_matching_email_auth_key_error_flash
|
156
|
-
* lockout feature
|
157
|
-
* no_matching_unlock_account_key_message =>
|
158
|
-
no_matching_unlock_account_key_error_flash
|
159
|
-
* reset_password feature
|
160
|
-
* no_matching_reset_password_key_message =>
|
161
|
-
no_matching_reset_password_key_error_flash
|
162
|
-
* verify_account feature
|
163
|
-
* attempt_to_create_unverified_account_notice_message =>
|
164
|
-
attempt_to_create_unverified_account_error_flash
|
165
|
-
* attempt_to_login_to_unverified_account_notice_message =>
|
166
|
-
attempt_to_login_to_unverified_account_error_flash
|
167
|
-
* no_matching_verify_account_key_message =>
|
168
|
-
no_matching_verify_account_key_error_flash
|
169
|
-
* verify_login_change feature
|
170
|
-
* no_matching_verify_login_change_key_message =>
|
171
|
-
no_matching_verify_login_change_key_error_flash
|
172
|
-
|
173
|
-
Attempts to use the old method at configuration time, or calling
|
174
|
-
the method on the rodauth object at runtime, will result in a
|
175
|
-
deprecation warning.
|
@@ -1,12 +0,0 @@
|
|
1
|
-
= Improvements
|
2
|
-
|
3
|
-
* rotp 5.1 is now supported in the otp feature. Previous rotp
|
4
|
-
versions down to rotp 2.1.1 remain supported.
|
5
|
-
|
6
|
-
* When using the otp feature without the sms or recovery_codes
|
7
|
-
features, if an account gets locked out from OTP authentication due
|
8
|
-
to multiple invalid OTP authentication codes, automatically log
|
9
|
-
them out, and redirect them to the login page. Previously, the
|
10
|
-
default behavior in this case could be a redirect loop if OTP
|
11
|
-
authentication is required for the user on the default_redirect
|
12
|
-
page.
|
@@ -1,11 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* A jwt_cors feature has been added, handling Cross-Origin Resource
|
4
|
-
Sharing when using the jwt feature, including supporting CORS
|
5
|
-
preflight requests.
|
6
|
-
|
7
|
-
= Other Improvements
|
8
|
-
|
9
|
-
* Mail templates that include links (e.g. for verifying accounts),
|
10
|
-
now add a space after the link and before the newline, fixing
|
11
|
-
issues with some web mail providers that have broken auto-linkers.
|
@@ -1,32 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* When the email_auth feature is used, the link to request email
|
4
|
-
authentication is now displayed if the user inputs an incorrect
|
5
|
-
password. Previously, it was only shown if the user had not
|
6
|
-
yet entered a password.
|
7
|
-
|
8
|
-
* A send_email configuration method has been added, which can be
|
9
|
-
overridden to customize email delivery (such as logging such
|
10
|
-
email). The configuration method block accepts a Mail::Message
|
11
|
-
argument.
|
12
|
-
|
13
|
-
* All rodauth.*_route methods that return the name of the route
|
14
|
-
segment now have rodauth.*_path and rodauth.*_url equivalents,
|
15
|
-
which return the path and URL for the related routes, respectively.
|
16
|
-
The rodauth.*_path methods are useful when constructing links to
|
17
|
-
the related Rodauth pages on the same site, and the rodauth.*_url
|
18
|
-
methods are useful for constructing link to the Rodauth pages from
|
19
|
-
other sites or in email.
|
20
|
-
|
21
|
-
= Other Improvements
|
22
|
-
|
23
|
-
* Specs have been removed from the gem file, reducing gem size by
|
24
|
-
over 20%.
|
25
|
-
|
26
|
-
* rodauth.authenticated? now returns true on the OTP setup page
|
27
|
-
when using the otp feature. Previously, this method returned
|
28
|
-
false on the OTP setup page. However, as the user has not yet
|
29
|
-
setup OTP when viewing this page, they should be considered
|
30
|
-
fully authenticated, as they would be if they viewed any other
|
31
|
-
page before setting up OTP. This change probably only affects
|
32
|
-
cases where the layout uses rodauth.authenticated?.
|
data/doc/release_notes/1.3.0.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* A login_maximum_length configuration method has been added. This
|
4
|
-
defaults to 255, and rodauth will now show an error message if a
|
5
|
-
user tries to create a login longer than this setting.
|
6
|
-
|
7
|
-
= Backwards Compatibility
|
8
|
-
|
9
|
-
* Rodauth's documentation and test code now use :Bignum instead of
|
10
|
-
Bignum for database-independent 64-bit integer types. This is
|
11
|
-
because using Bignum is now deprecated in Sequel as it will stop
|
12
|
-
working correctly in ruby 2.4+, due to the unification of Fixnum
|
13
|
-
and Bignum into Integer.
|
14
|
-
|
15
|
-
Rodauth's library code does not use either :Bignum or Bignum, but if
|
16
|
-
you are starting to use Rodauth and are copying the example
|
17
|
-
migration from Rodauth's documentation, or you are running the
|
18
|
-
migrations in Rodauth's tests, you now need to use Sequel 4.35.0+.
|
19
|
-
|
20
|
-
* Some files related to the hosting of the demo site on Heroku have
|
21
|
-
been removed from the repository.
|
data/doc/release_notes/1.4.0.txt
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* A update_password_hash feature has been added, which will update
|
4
|
-
the password hash for the account whenever the account's current
|
5
|
-
password hash has a cost different from the currently configured
|
6
|
-
password hash cost.
|
7
|
-
|
8
|
-
This allows you to increase the password hash cost for all
|
9
|
-
accounts or for certain types of accounts, and have the password
|
10
|
-
hashes automatically updated to use the new cost the next time the
|
11
|
-
correct password is provided for the account.
|