Skip to content

[A177r8] validate images with digest - #129

Open
paulhiggs wants to merge 4 commits into
DVBProject:masterfrom
paulhiggs:digests
Open

[A177r8] validate images with digest#129
paulhiggs wants to merge 4 commits into
DVBProject:masterfrom
paulhiggs:digests

Conversation

@paulhiggs

Copy link
Copy Markdown
Collaborator

See A177r8 clause 7.5
when the @integrity attribute is provided with an image resource, validate the image against it. Currently only supports sha1 and sha256

…urce, validate the image against it. Currently only supports sha1 and sha256
@paulhiggs
paulhiggs requested a review from sofia-tsa July 28, 2026 07:23
@paulhiggs

Copy link
Copy Markdown
Collaborator Author

This update only checks the content digests provided in the @integrity attribute against the http/https loaded resource. Additional update is needed for inline images, i.e.

      <tva:MediaLocator>
        <tva:MediaUri contentType="image/png" integrity="sha1=:checksum:>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...AAAABJRU5ErkJggg==</tva:MediaUri>
      </tva:MediaLocator>

Clause 7.5.3 of A177r8 says

If content digest is specified for an inline image it should only reflect the image payload and not the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant