docbrown/app
Julianna Tetreault 0ee74d1e26
Validate Image URLs in SiteConfig (#11299) [deploy]
* Adds image URL validation to image URLs in configs_controller.rb

* Adds additional image URLs to #valid_image_url in configs_controller.rb

* Adds tests around valid image URLs to configs_spec.rb

* WIP: sets strict conditions for before_action

* WIP: comments out unused code for draft PR

* WIP: cleans up configs_controller.rb for draft PR review

* Renames constant to more explicit IMAGE_FIELDS in configs_controller.rb

* Removes unnecessary comments from admin/configs_spec.rb

* Checks for matching keys in params and IMAGE_FIELDS in configs_controller

* Refactors #valid_image_urls and #valid_image_url in ConfigsController (THANK U, ANDY)

* Refactors image-related code and error messages in Admin::ConfigsController

* Renames expected_image_url to invalid_image_url and removes useless test

* Fix: update the tests to contain valid image urls so that they pass the validation.

* Adjusts tests & VALID_URL regex to validate images rather than image-specific URL

* Replaces $ with \z per Rhymes suggestion and feedback

* Adds accidentally removed code

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2020-11-12 12:02:07 -07:00
..
assets Developer experience/security: Make dev/test blow up if current_user is used erroneously (#11237) 2020-11-12 11:54:23 -05:00
black_box Small adjustment to blackbox.rb (#10961) 2020-10-20 21:14:56 -04:00
controllers Validate Image URLs in SiteConfig (#11299) [deploy] 2020-11-12 12:02:07 -07:00
dashboards Add registered fields to resource_admin (#10941) 2020-10-19 17:50:34 -04:00
decorators CSS Cleanups, part 2 (#10527) 2020-10-03 06:57:57 +02:00
errors [deploy] Add contexts and permissions to liquid tags (#8917) 2020-06-30 14:53:18 -04:00
fields Enables Rails cops (#2186) 2019-03-25 09:25:55 -04:00
helpers Email login always on (#11307) 2020-11-12 09:32:58 -06:00
javascript Email login always on (#11307) 2020-11-12 09:32:58 -06:00
labor Move ArticleSuggester to Articles::Suggest service (#11370) 2020-11-11 13:06:33 -05:00
lib Fix typo in placeholder anti-spam terms (#11360) 2020-11-10 15:36:52 -05:00
liquid_tags Introduce tweet_timeline liquid tag (#7605) (#10825) 2020-10-30 11:03:40 +01:00
mailers Add config option for Forem collective noun (#11107) 2020-10-27 12:45:52 -04:00
middlewares Move TimeZoneSetter middleware in proper place (#11336) 2020-11-09 17:11:10 +01:00
models Email login always on (#11307) 2020-11-12 09:32:58 -06:00
policies [deploy] Disable ability to upload videos on *some* forems Part 2 (#10955) 2020-10-20 17:33:35 +02:00
queries/admin Filter by a few other roles when adding potential mods (#11187) 2020-11-02 15:05:19 -05:00
refinements Update data exporter to handle admin send (#10274) 2020-10-26 18:00:56 -04:00
sanitizers [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
serializers [deploy] Refactor:Remove Reaction Search Code (#10377) 2020-09-23 12:27:50 -05:00
services Refactor:Replace Production Check with Average Metrics (#11096) 2020-11-12 10:03:10 -06:00
uploaders [deploy] Bug Fix: Validate GIFs Frames and Add MiniMagick Timeout (#9319) 2020-07-15 09:49:24 -05:00
view_objects [deploy] Enable admin-configured app_domain (#10206) 2020-09-11 09:38:34 -04:00
views Developer experience/security: Make dev/test blow up if current_user is used erroneously (#11237) 2020-11-12 11:54:23 -05:00
workers Feature:Send Alerts for Failed DataUpdateScripts to Datadog (#11381) 2020-11-12 10:59:54 -06:00