-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix signature begin determination #2
fix signature begin determination #2
Conversation
previously the begin of the signature was determined based on the stub- length. NOTE: determining the signature begin based on manifest parser end position can lead to overwriting the last byte of the last file in the phar with the first byte of the hash. this ignored the size of the manifest. fix is to take the end of the manifest which is known due to it's size and add the compressed file sizes to it instead of adding this to the internal position of the parser that runs only to detect the compressed file sizes. authoritative is the manifest size.
the Timestamps class had a flaw when determining the byte-offset of the phar signature when re-writing the signature that could (and did) lead to overwriting the last byte of the last file with the first byte of the signature raw hash. upstream-pr-signature-offset: Seldaek/phar-utils#2 upstream-pr-little-endian: Seldaek/phar-utils#3
the Timestamps class had a flaw when determining the byte-offset of the phar signature when re-writing the signature that could (and did) lead to overwriting the last byte of the last file with the first byte of the signature raw hash. upstream-pr-signature-offset: Seldaek/phar-utils#2 upstream-pr-little-endian: Seldaek/phar-utils#3
the Timestamps class had a flaw when determining the byte-offset of the phar signature when re-writing the signature that could (and did) lead to overwriting the last byte of the last file with the first byte of the signature raw hash. upstream-pr-signature-offset: Seldaek/phar-utils#2 upstream-pr-little-endian: Seldaek/phar-utils#3
the Timestamps class had a flaw when determining the byte-offset of the phar signature when re-writing the signature that could (and did) lead to overwriting the last byte of the last file with the first byte of the signature raw hash. upstream-pr-signature-offset: Seldaek/phar-utils#2 upstream-pr-little-endian: Seldaek/phar-utils#3
the Timestamps class had a flaw when determining the byte-offset of the phar signature when re-writing the signature that could (and did) lead to overwriting the last byte of the last file with the first byte of the signature raw hash. upstream-pr-signature-offset: Seldaek/phar-utils#2 upstream-pr-little-endian: Seldaek/phar-utils#3
the Timestamps class had a flaw when determining the byte-offset of the phar signature when re-writing the signature that could (and did) lead to overwriting the last byte of the last file with the first byte of the signature raw hash. upstream-pr-signature-offset: Seldaek/phar-utils#2 upstream-pr-little-endian: Seldaek/phar-utils#3
the Timestamps class had a flaw when determining the byte-offset of the phar signature when re-writing the signature that could (and did) lead to overwriting the last byte of the last file with the first byte of the signature raw hash. upstream-pr-signature-offset: Seldaek/phar-utils#2 upstream-pr-little-endian: Seldaek/phar-utils#3
the Timestamps class had a flaw when determining the byte-offset of the phar signature when re-writing the signature that could (and did) lead to overwriting the last byte of the last file with the first byte of the signature raw hash. upstream-pr-signature-offset: Seldaek/phar-utils#2 upstream-pr-little-endian: Seldaek/phar-utils#3
the Timestamps class had a flaw when determining the byte-offset of the phar signature when re-writing the signature that could (and did) lead to overwriting the last byte of the last file with the first byte of the signature raw hash. upstream-pr-signature-offset: Seldaek/phar-utils#2 upstream-pr-little-endian: Seldaek/phar-utils#3
the Timestamps class had a flaw when determining the byte-offset of the phar signature when re-writing the signature that could (and did) lead to overwriting the last byte of the last file with the first byte of the signature raw hash. upstream-pr-signature-offset: Seldaek/phar-utils#2 upstream-pr-little-endian: Seldaek/phar-utils#3
Just gonna assume you did your research here, because I frankly don't feel like digging into this again right now :) |
Let's say I did my research. And just in case for some future reference, I've tagged the commits locally where the problems arose so the revisions don't go away. It was always reproducible (when the files put into the phar are the same). |
For future reference, I've pushed the three tags just to have this transparent:
These tags keep the revisions in the distributed Github repository of ktomk/pipelines. |
previously the begin of the signature was determined based on the stub-
length.
NOTE: determining the signature begin based on manifest parser end position
can lead to overwriting the last byte of the last file in the phar
with the first byte of the hash.
this ignored the size of the manifest.
fix is to take the end of the manifest which is known due to it's size
and add the compressed file sizes to it instead of adding this to the
internal position of the parser that runs only to detect the compressed
file sizes. authoritative is the manifest size.