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

Appearance settings

AttributeError raised on invalid data URI in sanitizer #188

Copy link
Copy link
Closed
@papachoco

Description

@papachoco
Issue body actions

While trying to sanitize u'<html><body><audio controls="" src="data:foobar"></audio></body></html>'

I get an AttributeError exception In HTMLSanitizerMixin line 218

215: m = content_type_rgx.match(uri.path)
216: if not m:
217:      del attrs[attr]
218: if m.group('content_type') not in self.allowed_content_types:
             del attrs[attr]

Line 215 returns None , but in line 218 m is assumed to be None

Carlos

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.