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

Can't open broken email bodies #4586

Closed
2 tasks done
charlag opened this issue Sep 16, 2022 · 0 comments · Fixed by #4587
Closed
2 tasks done

Can't open broken email bodies #4586

charlag opened this issue Sep 16, 2022 · 0 comments · Fixed by #4587
Labels
bug broken functionality, usability problems, unexpected errors state:done meets our definition of done state:tested We tested it and are about to release it
Milestone

Comments

@charlag
Copy link
Contributor

charlag commented Sep 16, 2022

Urlify fails on invalid HTML tags.

Logger.ts:90 error Error: token type was unexpectedly EndTag
    at e.current (worker.js:12:197391)
    at e.finishAttributeValue (worker.js:12:199543)
    at e.attributeName (worker.js:12:191493)
    at e.tokenizePart (worker.js:12:195534)
    at e.tokenize (worker.js:12:195279)
    at e.tokenize (worker.js:12:196864)
    at wd (worker.js:12:199726)
    at Td.attributes.rel (worker.js:12:200853)
    at Td (worker.js:12:201653)
    at urlify (worker.js:12:204254) Error: token type was unexpectedly EndTag
    at e.current (file:///tmp/.mount_tutano4QItIh/resources/app.asar/worker.js:12:197391)
    at e.finishAttributeValue (file:///tmp/.mount_tutano4QItIh/resources/app.asar/worker.js:12:199543)
    at e.attributeName (file:///tmp/.mount_tutano4QItIh/resources/app.asar/worker.js:12:191493)
    at e.tokenizePart (file:///tmp/.mount_tutano4QItIh/resources/app.asar/worker.js:12:195534)
    at e.tokenize (file:///tmp/.mount_tutano4QItIh/resources/app.asar/worker.js:12:195279)
    at e.tokenize (file:///tmp/.mount_tutano4QItIh/resources/app.asar/worker.js:12:196864)
    at wd (file:///tmp/.mount_tutano4QItIh/resources/app.asar/worker.js:12:199726)
    at Td.attributes.rel (file:///tmp/.mount_tutano4QItIh/resources/app.asar/worker.js:12:200853)
    at Td (file:///tmp/.mount_tutano4QItIh/resources/app.asar/worker.js:12:201653)
    at urlify (file:///tmp/.mount_tutano4QItIh/resources/app.asar/worker.js:12:204254)

example body:

 Client: Browser
 Tutanota version: 3.100.0
Error
 Error message: token type was unexpectedly EndTag
Stacktrace: 
execute/Sd</e.prototype.current@https://mail.tutanota.com/worker.js:17:51236
execute/Sd</e.prototype.finishAttributeValue@https://mail.tutanota.com/worker.js:17:53388
attributeName@https://mail.tutanota.com/worker.js:17:45338
execute/Fd</e.prototype.tokenizePart@https://mail.tutanota.com/worker.js:17:49379
execute/Fd</e.prototype.tokenize@https://mail.tutanota.com/worker.js:17:49124
execute/Sd</e.prototype.tokenize@https://mail.tutanota.com/worker.js:17:50709
xd@https://mail.tutanota.com/worker.js:17:53571
Gd/<@https://mail.tutanota.com/worker.js:17:54700
Gd@https://mail.tutanota.com/worker.js:17:55498
urlify@https://mail.tutanota.com/worker.js:17:58178
handleMessage@https://mail.tutanota.com/common-d62b1623.js:1:16296
@https://mail.tutanota.com/common-d62b1623.js:1:15548
setMessageHandler/this._worker.onmessage@https://mail.tutanota.com/common-d62b1623.js:1:15118

in this case </e.prototype.current would be treated as a tag and it would fail.

Test notes

  • Replace mail body with a broken one (breakpoint in SendMailModel.send and replace this.body), email should still open without issues
  • Send an error report from Firefox (throw some error from the console?). The mail body should be openable without warnings about urlifying in the console.
@charlag charlag added the bug broken functionality, usability problems, unexpected errors label Sep 16, 2022
@charlag charlag added this to the 3.100.1 milestone Sep 16, 2022
@charlag charlag self-assigned this Sep 16, 2022
charlag added a commit that referenced this issue Sep 16, 2022
charlag added a commit that referenced this issue Sep 16, 2022
urlifier can fail on invalid HTML but we still want to display the
body.

fix #4586
@charlag charlag added the state:done meets our definition of done label Sep 16, 2022
@charlag charlag removed their assignment Sep 16, 2022
charlag added a commit that referenced this issue Sep 16, 2022
charlag added a commit that referenced this issue Sep 16, 2022
urlifier can fail on invalid HTML but we still want to display the
body.

fix #4586
@paw-hub paw-hub self-assigned this Sep 20, 2022
@paw-hub paw-hub added the state:tested We tested it and are about to release it label Sep 20, 2022
@paw-hub paw-hub removed their assignment Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug broken functionality, usability problems, unexpected errors state:done meets our definition of done state:tested We tested it and are about to release it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants