Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow http#1369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JoannaaKL merged 2 commits intomainfromallow-http-in-links
Nov 6, 2025
Merged

Allow http#1369

JoannaaKL merged 2 commits intomainfromallow-http-in-links
Nov 6, 2025

Conversation

@JoannaaKL
Copy link
Contributor

Also allow http links in sanitisation filter.

@JoannaaKLJoannaaKL requested a review froma team as acode ownerNovember 6, 2025 12:24
CopilotAI review requested due to automatic review settingsNovember 6, 2025 12:24
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR modifies the HTML sanitization policy to allow both HTTP and HTTPS URL schemes in links, where previously only HTTPS was permitted.

  • Expands allowed URL schemes from HTTPS-only to include both HTTP and HTTPS protocols
Comments suppressed due to low confidence (2)

pkg/sanitize/sanitize.go:57

  • Allowing 'http' URLs introduces a security concern. HTTP traffic is unencrypted and susceptible to man-in-the-middle attacks, which could expose users to malicious content. The policy already usesRequireNoFollowOnLinks(true) andRequireNoReferrerOnLinks(true), but these don't protect against eavesdropping or tampering with HTTP links. Consider whether HTTP URLs are truly necessary, or if the policy should continue enforcing HTTPS-only to ensure secure connections.
if toggled {

pkg/sanitize/sanitize.go:57

  • The change to allow 'http' URLs lacks test coverage. The existing test suite only includes an HTTPS URL test case (line 223-224 in sanitize_test.go). Add test cases to verify that HTTP URLs are properly allowed and sanitized, for example: a test with<a href=\"http://example.com\">link</a> to confirm the new behavior.
if toggled {

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

@JoannaaKLJoannaaKL merged commitbc4555f intomainNov 6, 2025
16 checks passed
@JoannaaKLJoannaaKL deleted the allow-http-in-links branchNovember 6, 2025 13:48
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@kerobbikerobbikerobbi approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@JoannaaKL@kerobbi

[8]ページ先頭

©2009-2025 Movatter.jp