Skip to content
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

Time based PDF upload warning #328

Open
felix-engelmann opened this issue Nov 4, 2023 · 0 comments
Open

Time based PDF upload warning #328

felix-engelmann opened this issue Nov 4, 2023 · 0 comments

Comments

@felix-engelmann
Copy link

The warning messages on the paper edit page are very helpful in hinting to wrongly filled fields. An enhancement could be a check on the uploaded PDF to verify that the freshly uploaded PDF has a newer creation time stamp that the one present.
This would catch accidental uploads of wrong PDFs as an update should use a newer PDF.

I looked into creating a PR, but I'm don't understand the architecture well enough to decide where a good place for such a feature would be. The banal script does not extract this information and doing so would need a dependency, e.g. https://metacpan.org/pod/PDF::API2 . However similarly extracting the information in PHP requires some dependency.

I saw that the banal data is cached in the PaperStorage table which would allow a comparison to the creation timestamp of the previous upload.
In what I saw, checkformat.php does not care about old versions. So I'm not sure if a creation time check should be implemented like this.

What is a good path to implement this feature? Add a perl dependency or proceed in php?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant