about summary refs log tree commit diff
path: root/app/validators
AgeCommit message (Collapse)Author
2019-01-10Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - .eslintrc.yml Removed, as upstream removed it. - app/controllers/admin/statuses_controller.rb Minor code cleanup when porting one of our features. - app/models/account.rb Note length validation has changed upstream. We now use upstream's validation (dropped legacy glitch-soc account metadata stuff) but with configurable limit. - app/services/post_status_service.rb Upstream has added support for scheduled toots, refactoring the code a bit. Adapted our changes to this refactoring. - app/views/stream_entries/_detailed_status.html.haml Not a real conflict, changes too close. - app/views/stream_entries/_simple_status.html.haml Not a real conflict, changes too close.
2019-01-05Change note length validation to ignore mention domains and URLs (#9717)Eugen Rochko
Fix #4419
2019-01-03Add specs for UnreservedUsernameValidator (#9698)ysksn
* Add specs for UnreservedUsernameValidator * Use instance variable
2019-01-02Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts manually resolved: - app/services/post_status_service.rb - config/locales/simple_form.pl.yml - config/routes.rb - config/webpack/loaders/sass.js - config/webpack/shared.js - package.json - yarn.lock
2018-12-29Add specs for BlackListedEmailValidator (#9651)ysksn
* Add specs for BlackListedEmailValidator * Use instance variable
2018-12-29Add specs for DisallowedHashtagsValidator (#9653)ysksn
In order to implement tests easier, `#select_tags` created.
2018-12-28Add pending specs for StatusLengthValidator (#9647)ysksn
* Add pending specs of StatusLengthValidator * Use instance variable
2018-12-15Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/controllers/directories_controller.rb - app/controllers/settings/applications_controller.rb - app/controllers/settings/base_controller.rb - app/controllers/settings/deletes_controller.rb - app/controllers/settings/exports_controller.rb - app/controllers/settings/follower_domains_controller.rb - app/controllers/settings/imports_controller.rb - app/controllers/settings/migrations_controller.rb - app/controllers/settings/notifications_controller.rb - app/controllers/settings/preferences_controller.rb - app/controllers/settings/sessions_controller.rb - app/controllers/settings/two_factor_authentication/confirmations_controller.rb - app/controllers/settings/two_factor_authentication/recovery_codes_controller.rb - app/controllers/settings/two_factor_authentications_controller.rb Conflicts were due to some refactoring already made in glitch-soc when introducing flavours.
2018-12-10Improve e-mail MX validator and add tests (#9489)Eugen Rochko
2018-11-09Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2018-11-08Fix follow limit validator reporting lower number past threshold (#9230)Eugen Rochko
* Fix follow limit validator reporting lower number past threshold * Avoid floating point follow limit
2018-10-05Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: db/migrate/20170716191202_add_hide_notifications_to_mute.rb spec/controllers/application_controller_spec.rb Took our version, upstream changes were only minor style linting.
2018-10-04Limit the number of people that can be followed from one account (#8807)Eugen Rochko
Configurable soft limit of 7,500, and above that, configurable ratio of 1.1 * followers, controlled by: - MAX_FOLLOWS_THRESHOLD - MAX_FOLLOWS_RATIO Fix #2311
2018-07-26Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2018-07-26Call address instead of exchange (#8076)abcang
2018-07-09Merge branch 'master' into glitch-soc/tentative-mergeThibaut Girka
Conflicts: README.md app/controllers/statuses_controller.rb app/lib/feed_manager.rb config/navigation.rb spec/lib/feed_manager_spec.rb Conflicts were resolved by taking both versions for each change. This means the two filter systems (glitch-soc's keyword mutes and tootsuite's custom filters) are in place, which will be changed in a follow-up commit.
2018-07-05In e-mail validator, fallback from MX to A record (#7955)Eugen Rochko
Fix #7831
2018-05-29Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2018-05-28fix: Don't validate MX record in development (#7654)takayamaki
2018-05-27Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: config/locales/ca.yml config/locales/nl.yml config/locales/oc.yml config/locales/pt-BR.yml Resolved conflicts by removing upstream-specific changes
2018-05-27Validate that e-mail resolves with MX and it's not blacklisted (#7631)Eugen Rochko
Original patch by @j-a4
2018-05-03Merge remote-tracking branch 'origin/master' into gs-masterDavid Yip
Conflicts: .travis.yml Gemfile.lock README.md app/controllers/settings/follower_domains_controller.rb app/controllers/statuses_controller.rb app/javascript/mastodon/locales/ja.json app/lib/feed_manager.rb app/models/media_attachment.rb app/models/mute.rb app/models/status.rb app/services/mute_service.rb app/views/home/index.html.haml app/views/stream_entries/_simple_status.html.haml config/locales/ca.yml config/locales/en.yml config/locales/es.yml config/locales/fr.yml config/locales/nl.yml config/locales/pl.yml config/locales/pt-BR.yml config/themes.yml
2018-04-23Implement the ability for instances to define a list of disallowed hashtags ↵Emelia Smith
(#7176) The goal here isn't to prevent these hashtags from existing, but just to strongly curtail their usage; The hashtags may still exist in the database via federated status, or from being created prior to this feature.
2018-04-14Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-04-12Allow more than the max pins if account is not local (#7105)Renato "Lond" Cerqueira
Sidekiq sometimes throws errors for users that have more pinned items than the allowed by the local instance. It should only validate the number of pins for local accounts.
2018-03-27Merge remote-tracking branch 'origin/master' into gs-masterDavid Yip
2018-03-27Fix UniqueUsernameValidator comparison (#6926)Eugen Rochko
Comparison was downcasing only one side, therefore if previously existing account had a non-lowercase spelling, it would be ignored when checking for duplicates. New rake task `mastodon:maintenance:find_duplicate_usernames` will help find constraint violations that might have occured from the presence of this bug. Bump version to 2.3.3
2018-03-21Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-03-21Permit dots in usernames with conditions (#6844)Eugen Rochko
* Permit dots in usernames with conditions - Dot cannot be the start or end of username - a.lice and al.ice are considered the same during sign-up * Fix regex mixin flags
2018-02-04Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
Conflicts: .env.production.sample app/controllers/auth/confirmations_controller.rb db/schema.rb
2018-02-04Validation of count works even when text of status is nil (#6429)abcang
2018-02-02Merge remote-tracking branch 'tootsuite/master' into merge-upstreamDavid Yip
Conflicts: app/javascript/styles/mastodon/components.scss
2018-02-02pam authentication (#5303)Alexander
* add pam support, without extra column * bugfixes for pam login * document options * fix code style * fix codestyle * fix tests * don't call remember_me without password * fix codestyle * improve checks for pam usage (should fix tests) * fix remember_me part 1 * add remember_token column because :rememberable requires either a password or this column. * migrate db for remember_token * move pam_authentication to the right place, fix logic bug in edit.html.haml * fix tests * fix pam authentication, improve username lookup, add comment * valid? is sometimes not honored, return nil instead trying to authenticate with pam * update devise_pam_authenticatable2 and adjust code. Fixes sideeffects observed in tests * update devise_pam_authenticatable gem, fixes for codeconventions, fix finding user * codeconvention fixes * code convention fixes * fix idention * update dependency, explicit conflict check * fix disabled password updates if in pam mode * fix check password if password is present, fix templates * block registration if account is maintained by pam * Revert "block registration if account is maintained by pam" This reverts commit 8e7a083d650240b6fac414926744b4b90b435f20. * fix identation error introduced by rebase * block usernames maintained by pam * document pam settings better * fix code style
2017-12-12Merge remote-tracking branch 'tootsuite/master' into merge-upstreamDavid Yip
2017-12-09Limit users to 50 lists, remove pagination from lists API (#5933)Eugen Rochko
2017-11-14Rename MAX_CHARS to MAX_TOOT_CHARS to be more specific.Lain Iwakura
2017-11-14Code style fixes.Lain Iwakura
2017-11-14Make character limit configurable.Lain Iwakura
2017-10-04Implement EmailBlackList (#5109)utam0k
* Implement BlacklistedEmailDomain * Use Faker::Internet.domain_name * Remove note column * Add frozen_string_literal comment * Delete unnecessary codes * Sort alphabetically * Change of wording * Rename BlacklistedEmailDomain to EmailDomainBlock
2017-09-13Fix #4918 - Limit pinned toots to 5 (#4923)Eugen Rochko
2017-08-25Pinned statuses (#4675)Eugen Rochko
* Pinned statuses * yarn manage:translations
2017-07-31Fix length validator counting things that look like URIs like URLs (#4462)Eugen Rochko
URI.extract is too strong, not limited to URLs, matched real text. Same issue was present in language detector.
2017-07-29Count all URLs in text as 23 characters flat, do not count domain part of ↵Eugen Rochko
usernames (#4427) * Count all URLs in text as 23 characters flat, do not count domain part of usernames * Add new status text counting logic to web UI
2017-06-19Fix character/grapheme count stuff (#3839)Gô Shoemake
* Bring Toot button in line with counter Both should use stringz I guess * Use grapheme_length for character count
2017-06-09Correct validators so that existing error messages would look correct (#3668)Eugen Rochko
2017-06-05Added support for configurable reserved usernames (fix of #1382) (#3566)Eugen Rochko
* Added support for configurable reserved usernames * Added reserved usernames from mastodon issue 1355 * Fix reserved usernames
2017-04-26Stricter whitelist rules (#2213)Guillaume Lo Re
* Stricter whitelist rules * Linting * Added spec for blacklisting * Test subdomain blacklist on domain whitelist * No need to split * Change spec name
2017-04-25Punycode URI normalization (#2370)Eugen
* Fix #2119 - Whenever about to send a HTTP request, normalize the URI * Add test for IDN request in FetchLinkCardService * Perform IDN normalization on domains before they are stored in the DB
2017-04-13Organize coverage dirs (#1695)Matt Jankowski
* Add `Presenters` group to SimpleCov configuration * Move validators to app/validators, add to simplecov config