Commit Graph

23 Commits

Author SHA1 Message Date
Donovan Daniels
32a1367cfe
[Users] Consolidate password confirmation into singular route (#813) 2024-12-18 06:02:02 -08:00
Cinder
a0b51e40bc
[Users] Rework login pages and increase password requirements (#825) 2024-12-14 17:37:53 -08:00
Earlopain
fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00
Earlopain
de3f7d6a6e
[Tests] Fix random failures
Sometimes the seconds tick over to the next one during execution,
resulting in failures. This should be the end of that.
2023-02-27 13:00:28 +01:00
Earlopain
e4cfa55f35
[Users] Fix admins not being able to edit when email is blank 2022-10-16 15:03:16 +02:00
Earlopain
e18a2602b6
[Tests] Small amount of fixes 2022-04-21 21:23:33 +02:00
Earlopain
20146b106d
[Tests] A bunch of more fixes 2022-04-13 08:54:50 +02:00
Earlopain
3740599920
[Tests] Fix a bunch of tests 2022-04-05 18:50:34 +02:00
Earlopain
8007881660
[Tests] Fix some password reset tests 2022-02-19 17:34:50 +01:00
Kira
db8d4c4773 Normalize EOL style + newline at end of files. 2020-10-24 05:50:32 -07:00
Kira
9fa294ba31 Convert gold -> privileged for user level 2019-06-29 08:45:58 -07:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
evazion
a92120e873 Fix #2785: Allow changing API key; require password to view or change key. 2016-12-18 06:30:48 -06:00
evazion
2dadad395b Add test for setting dmail filters on other people. 2016-11-12 01:10:14 -06:00
Albert Yi
eb6746a8a8 additional checks on forum topic visibility 2016-11-07 10:48:04 -08:00
r888888888
09e47607cc fix test 2014-02-03 13:03:45 -08:00
r888888888
eab2eb1d82 fixes #1651 2013-05-21 17:52:03 -07:00
r888888888
0a9e2a39b0 add account deletion 2013-05-16 15:15:00 -07:00
小太
cba839ba76 Kill trailing whitespace in ruby files 2013-03-19 23:10:10 +11:00
albert
f52181db94 Major revamp of security. Passwords are first SHA1 hashed and then
that hash is bcrypted.  Bcrypted hashes are stored in a new column on
users.  This separate column is only to allow for rollbacks,
eventually the old SHA1 hash column will be removed.  Sensitive cookie
details are now encrypted to prevent user tampering and more stringent
checks on secret_token and session_secret_key are enforced.
2013-03-04 22:55:41 -05:00
albert
17881068e1 * Removed Pixa/Tinami sources
* Upgraded to Rails 3.2.3
* Fixed tests
2012-06-01 19:22:58 -04:00
albert
c453e7db0f implemented password resets 2011-07-20 15:54:17 -04:00
albert
72e9da01b5 fixing functional tests 2011-07-17 16:42:26 -04:00