Martin Brennan 39b2fb8649
FIX: Invalid URLs could raise exceptions when calling UrlHelper.rails_route_from_url (#10782)
Upload.secure_media_url? raised an exceptions when the URL was invalid,
which was a issue in some situations where secure media URLs must be
removed.

For example, sending digests used PrettyText.strip_secure_media,
which used Upload.secure_media_url? to replace secure media with
placeholders. If the URL was invalid, then an exception would be raised
and left unhandled.

Now instead in UrlHelper.rails_route_from_url we return nil if there is something wrong with the URL.

Co-authored-by: Bianca Nenciu <nenciu.bianca@gmail.com>
2020-09-30 15:20:00 +10:00
..
2020-09-10 13:41:46 +10:00
2020-08-14 12:01:31 +10:00
2020-05-05 13:46:57 +10:00
2020-01-15 11:27:12 +01:00
2020-04-30 16:48:53 +10:00
2020-06-15 10:05:22 +08:00
2019-10-21 12:08:20 +01:00
2020-05-05 13:46:57 +10:00
2019-05-22 17:39:44 +03:00
2020-05-05 13:46:57 +10:00
2020-05-05 13:46:57 +10:00
2020-07-21 15:55:03 +08:00
2020-09-24 16:05:52 -04:00
2020-04-30 16:48:53 +10:00