]> git.ipfire.org Git - thirdparty/FORT-validator.git/commit
RRDP XML strings review
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Sat, 24 Feb 2024 01:19:49 +0000 (19:19 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Sat, 24 Feb 2024 01:19:49 +0000 (19:19 -0600)
commit1bf9376ea44d79c2e97a01115002efb3873718a5
treefde516a21fd88cf5e4705654b4b123d114c0bcca
parent96b483001adea84ab74078d288a472459f7285cb
RRDP XML strings review

Not much to report on this one. It seemed the code was casting string
types back and forth too carelessly, but it turns out its assumptions
are agreeable.

In particular, I got scared by what appeared to be a missing printable
ASCII validation. But no; libxml2 takes care of it, thanks to the XML
grammar.

So what was really missing was a comment explaining the logic, so I
don't have to dig it up again. And some unit tests to preserve the
guarantees.

There are other validations I'm not so sure about, but I decided to
leave them out of the scope of this commit.
14 files changed:
src/rrdp.c
test/resources/rrdp/notif-0deltas.xml [new file with mode: 0644]
test/resources/rrdp/notif-bad-hash.xml [new file with mode: 0644]
test/resources/rrdp/notif-bad-serial.xml [new file with mode: 0644]
test/resources/rrdp/notif-bad-session-id.xml [new file with mode: 0644]
test/resources/rrdp/notif-bad-uri-1.xml [new file with mode: 0644]
test/resources/rrdp/notif-bad-uri-2.xml [new file with mode: 0644]
test/resources/rrdp/notif-bad-uri-3.xml [new file with mode: 0644]
test/resources/rrdp/notif-bad-version.xml [new file with mode: 0644]
test/resources/rrdp/notif-bad-xmlns.xml [new file with mode: 0644]
test/resources/rrdp/notif-large-serial.xml [new file with mode: 0644]
test/resources/rrdp/notif-ok.xml [new file with mode: 0644]
test/resources/rrdp/snapshot-bad-publish.xml [new file with mode: 0644]
test/rrdp_test.c