about summary refs log tree commit diff
path: root/app/validators
AgeCommit message (Collapse)Author
2021-05-11Merge branch 'glitch'Starfall
2021-05-07Merge branch 'main' into glitch-soc/merge-upstreamClaire
- `app/views/statuses/_simple_status.html.haml`: Small markup change in glitch-soc, on a line that has been modified by upstream. Ported upstream changes.
2021-05-04Fix existing username validator not allowing multiple accounts (#16153)Eugen Rochko
Fix #16107
2021-04-24Change auto-following admin-selected accounts, show in recommendations (#16078)Eugen Rochko
2021-04-20Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `README.md`: Upstream updated copyright year, we don't mention it so kept our version. - `app/controllers/admin/dashboard_controller.rb`: Not really a conflict, upstream change (removing the spam checker) too close to glitch-soc changes. Ported upstream changes. - `app/models/form/admin_settings.rb`: Same. - `app/services/remove_status_service.rb`: Same. - `app/views/admin/settings/edit.html.haml`: Same. - `config/settings.yml`: Same. - `config/environments/production.rb`: Not a real conflict, upstream added a default HTTP header, but we have extra headers in glitch-soc. Added the header.
2021-04-17Add canonical e-mail blocks for suspended accounts (#16049)Eugen Rochko
Prevent new accounts from being created using the same underlying e-mail as a suspended account using extensions and period permutations. Stores e-mails as a SHA256 hash
2021-04-02Merge branch 'glitch'Starfall
2021-04-02Merge commit '935e376078fa8716ea5475a45602301fd3d6b081'Starfall
2021-03-24Merge branch 'main' into glitch-soc/merge-upstreamClaire
2021-03-19Bypass MX validation for explicitly allowed domains (#15930)Claire
* Bypass MX validation for explicitly allowed domains This spares some lookups and prevent issues in some edge cases with local domains. * Add tests * Fix test
2021-03-19Merge branch 'main' into glitch-soc/merge-upstreamClaire
2021-03-19Prepare Mastodon for zeitwerk autoloader (#15917)Claire
* Prepare Mastodon for zeitwerk autoloader (Rails 6) Add inflections and rename/move a few classes. In particular, app/lib/exceptions.rb and app/lib/sanitize_config.rb were manually loaded while still in autoload paths. * Add inflection for Url → URL
2021-03-11Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/validators/status_length_validator.rb`: Conflict due to glitch-soc's configurable maximum toot chars. Ported upstream changes.
2021-03-04Merge remote-tracking branch 'glitchsoc/main' into mainStarfall
2021-03-04Fix URL scanning in note length validator and preview card fetching (#15827)Claire
* Add tests * Fix URL scanning in note length validator and preview card fetching
2021-03-02Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/validators/status_length_validator.rb`: Upstream changes too close to glitch-soc MAX_CHARS changes, but not a real conflict. Applied upstream changes. - `package.json`: glitch-soc-only dependency textually too close to a dependency updated upstream, not a real conflict. Applied upstream changes.
2021-03-02Update twitter-text from 1.14 to 3.1.0 and fix toot character counting (#15382)Claire
* Update twitter-text from 1.14 to 3.1.0 * Disable emoji parsing * Properly depend on twitter-text for url detection * Fix some URLs being wrongly detected client-side * Add test for server-side validation of non-autolinkable URLs * Fix server-side status length counting
2021-03-01Add `details` to error response for `POST /api/v1/accounts` in REST API (#15803)Eugen Rochko
2021-02-22someone asked for one-option pollsStarfall
2021-01-26Merge pull request #1491 from ThibG/glitch-soc/merge-upstreamThibG
Merge upstream changes
2021-01-26Support customizing poll option limitsleo60228
2021-01-26Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `CONTRIBUTING.md`: Not a real conflict, glitch-soc quotes the upstream file, which has been changed. Update the quote.
2021-01-22Optimize some regex matching (#15528)luigi
* Use Regex#match? * Replace =~ too * Avoid to call match? from Nil * Keep value of Regexp.last_match
2021-01-11Merge branch 'master' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/models/public_feed.rb`: Upstream refactored a bit, glitch-soc had specific code for local-only statuses. Updated glitch-soc's specific code accordingly.
2021-01-10Optimize map { ... }.compact calls (#15513)luigi
* Optimize map { ... }.compact using Enumerable#filter_map, supported since Ruby 2.7 * Add poyfill for Enumerable#filter_map
2020-12-19Merge branch 'master' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/services/resolve_url_service.rb`: The private toot search by URL hack has been revamped upstream. Took upstream's version.
2020-12-18Fix follow limit preventing re-following of a moved account (#14207)Eugen Rochko
2020-12-10Merge branch 'master' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/controllers/about_controller.rb`: Minor conflict caused by glitch-soc's theming system. Ported upstream changes.
2020-12-10Add honeypot fields and minimum fill-out time for sign-up form (#15276)ThibG
* Add honeypot fields to limit non-specialized spam Add two honeypot fields: a fake website input and a fake password confirmation one. The label/placeholder/aria-label tells not to fill them, and they are hidden in CSS, so legitimate users should not fall into these. This should cut down on some non-Mastodon-specific spambots. * Require a 3 seconds delay before submitting the registration form * Fix tests * Move registration form time check to model validation * Give people a chance to clear the honeypot fields * Refactor honeypot translation strings Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-08-13Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-08-12Improve email address validation (#14565)ThibG
* Increase DNS timeout from 1 second to 5 seconds for MX check 1 seconds is rather short when using a recursive DNS resolver which hasn't got a cached result already available. Use 5 seconds instead, which is the timeout value we use for outgoing HTTP queries. * Add more precise error messages for invalid e-mail addresses
2020-06-09Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/activitypub/collections_controller.rb`: Conflict due to glitch-soc having to take care of local-only pinned toots in that controller. Took upstream's changes and restored the local-only special handling. - `app/controllers/auth/sessions_controller.rb`: Minor conflicts due to the theming system, applied upstream changes, adapted the following two files for glitch-soc's theming system: - `app/controllers/concerns/sign_in_token_authentication_concern.rb` - `app/controllers/concerns/two_factor_authentication_concern.rb` - `app/services/backup_service.rb`: Minor conflict due to glitch-soc having to handle local-only toots specially. Applied upstream changes and restored the local-only special handling. - `app/views/admin/custom_emojis/index.html.haml`: Minor conflict due to the theming system. - `package.json`: Upstream dependency updated, too close to a glitch-soc-only dependency in the file. - `yarn.lock`: Upstream dependency updated, too close to a glitch-soc-only dependency in the file.
2020-06-02Add E2EE API (#13820)Eugen Rochko
2020-04-02Improve polls: option lengths & redesign (#13257)Sasha Sorokin
This commit redesign the polls and increases characters limit for the options from 25 to 50 characters, giving pollsters more freedom. Summarizing, the redesign is making the polls more adaptive for upcoming changes to the options characters limit: the bar, or a "chart", is now displayed separately from the option itself; vote check mark is moved next to the option text, making the percentages take less space. Option lengths are taken into account and text is wrapped to multiple lines if necessary to avoid overflow.
2020-02-03Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-02-01Search account domain in lowercase (#13016)abcang
* Search account domain in lowercase * fix rubocop error * fix spec/models/account_spec.rb
2020-01-25Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-01-25Fix validations of reactions limit (#12955)Eugen Rochko
2020-01-25Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-01-25Add limit of 8 different reaction types per announcement (#12950)Eugen Rochko
2020-01-24Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/statuses_controller.rb`: Minor conflict due to theming system
2020-01-23Add announcements (#12662)Eugen Rochko
* Add announcements Fix #11006 * Add reactions to announcements * Add admin UI for announcements * Add unit tests * Fix issues - Add `with_dismissed` param to announcements API - Fix end date not being formatted when time range is given - Fix announcement delete causing reactions to send streaming updates - Fix announcements container growing too wide and mascot too small - Fix `all_day` being settable when no time range is given - Change text "Update" to "Announcement" * Fix scheduler unpublishing announcements before they are due * Fix filter params not being passed to announcements filter
2020-01-12Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `Gemfile.lock`: No real conflict, glitch-soc-only dependency (redcarpet) too close to an upstream one (rdf-normalize) - `README.md`: we have different READMEs, discarded upstream's changes - `app/views/admin/custom_emojis/index.html.haml`: No real conflict, different context because of glitch-soc theming - `lib/mastodon/statuses_cli.rb`: Upstream added code to keep bookmarked statuses, we were already doing so with slightly different code. Discarded upstream's changes. - `package.json`: No real conflict, glitch-soc-only dependency (favico.js) too close to an upstream one
2020-01-12Fix invalid votes from the API being accepted (#12601)ThibG
* Fix invalid votes from the API being accepted Fixes #12556 - Ensure `choice` is an integer instead of silently converting to 0 - Ensure `choice` corresponds to an actual choice of the poll * Please CodeClimate
2019-10-10Increase poll option length limit to 100 chars, number of options to 5Thibaut Girka
2019-08-30Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/views/directories/index.html.haml Upstream has redesigned the profile directory, and we had a glitch-soc-specific change to hide follower counts. Ported that change to the new design.
2019-08-30Fix uncaught domain normalization error in remote follow (#11703)Eugen Rochko
2019-08-30Fix encoding error when checking e-mail MX records (#11696)Eugen Rochko
2019-08-12Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2019-08-08Fix crash when saving invalid domain name (#11528)Eugen Rochko
Fix #7629