Skip to content

URI::InvalidURIError: Invalid data URI #491

Description

@istana

Bugs

Getting URI::InvalidURIError: Invalid data URI with the lastest 6.3.4 release, works in 6.3.3.

Expected outcome

Accept all URLs including data:.

Actual outcome

Fails in def dedup_source_list(sources) on line schemes = sources.map { |source| [source, URI(source).scheme] }.to_h when sources array variable contains "data:" item.

URI("data:").scheme
URI::InvalidURIError: Invalid data URI

Config

 img_src: %w(
'self'
https:
data:
www.googletagmanager.com
maps.gstatic.com *.googleapis.com *.ggpht.com
https://www.google-analytics.com
),

Generated headers

N/A

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