Skip to content

URLs are sanitized with http, not https #1412

@paulschreiber

Description

@paulschreiber

Describe the bug

URLs are sanitized with http, not https. This could lead to privacy loss / redirection / other attacks.

Steps to reproduce (I have confirmed I can reproduce this issue on the develop branch):

  1. Create a field of type text_url
  2. Open a page with that field
  3. Enter google.com in the field
  4. Save the page

Expected

https://google.com/

Actual

http://google.com/

Possible Solution

If the original URL didn't contain a protocol, use set_url_scheme() to set it to HTTPS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions