a-sit / PDF-Over

https://technology.a-sit.at/en/pdf-over/
European Union Public License 1.2
14 stars 4 forks source link

missing error handling for ID austria username instead of number #116

Open Whestside opened 5 months ago

Whestside commented 5 months ago

Issue

When a username (Benutzername) is set on an ID Austria Account, A-Trust wants you to sign using the username and not your number so it returns a html page stating that error, which pdf-over can't parse.

In the log the parser throws ERROR | 2024-02-22 16:06:19,051 | Thread-4 @ at.asit.pdfover.gui.bku.mobile.ATrustParser | Did not find any top-level blocks. and dumps the page containing

[...]
<span id="txt1">Für Ihre ID Austria wurde ein Benutzername verwendet.</span>
<span id="UsernameText">Benutzername</span>: <strong>
<span id="UsernameValue">Max-Mustermann123</span></strong
        <p><span id="txt2">Um diesen Hinweis in Zukunft zu verhindern verwenden Sie bitte ihren Benutzernamen.</span></p>
[...]

but the gui only outputs a generic error Signatur-Fehler to the user.

Suggestion

Check for this error in the parser and add an according error message in the gui or read the username from the html and send a second request.

iaik-jheher commented 5 months ago

Thanks for the report! We're already aware of this and will be adding handling for the next version.