[openstreetmap/openstreetmap-website] Add social profile links (PR #5439)
Anton Khorev
notifications at github.com
Fri Dec 27 01:09:30 UTC 2024
@AntonKhorev commented on this pull request.
> +# created_at :datetime not null
+# updated_at :datetime not null
+#
+# Indexes
+#
+# index_social_links_on_user_id (user_id)
+#
+# Foreign Keys
+#
+# fk_rails_... (user_id => users.id)
+#
+
+class SocialLink < ApplicationRecord
+ belongs_to :user
+
+ validates :url, :presence => true, :format => { :with => URI::DEFAULT_PARSER.make_regexp(%w[http https]), :message => I18n.t("profiles.edit.social_links.http_parse_error") }
This doesn't check if `url` starts with `http://`.
And if you also disable CSP:

--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5439#pullrequestreview-2523564622
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5439/review/2523564622 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241226/d561f96f/attachment-0001.htm>
More information about the rails-dev
mailing list