Bug 158117 - LanguageTool integration: "+" character not recognized for the user ID
Summary: LanguageTool integration: "+" character not recognized for the user ID
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.1.2 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL: https://forum.languagetool.org/t/bug-...
Whiteboard: target:24.2.0 target:7.6.4
Keywords:
: 159551 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-11-08 15:15 UTC by Jocelyn
Modified: 2024-09-06 12:11 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn 2023-11-08 15:15:07 UTC
Description:
I subscribed to LanguageTool Premium services with an email address containing the "+" character. It didn't work. When I switch to just using LanguageTool without any account (so without filling the form for user ID and token), it worked.

So I thought about how many libraries out there does not implement the usage of the "+" character in email adresses and I change my ID user (which is also the email) to an email address which does not contain any "+", and it worked well.

Steps to Reproduce:
1. use a "+" in our email address for subscribing to LanguageTool
2. try to use languagetool within LibreOffice
3.

Actual Results:
No correction

Expected Results:
Some correction


Reproducible: Always


User Profile Reset: No

Additional Info:
Yes, "+" is a valid character for email. You should be able to have something like:

robert+di@caprio.com. the owner of robert@caprio.com should receive emails addressed to robert+whatever@caprio.com, see https://en.wikipedia.org/wiki/Email_address#Sub-addressing
Comment 1 Mike Kaganski 2023-11-08 18:35:11 UTC
Code pointer: makeHttpRequest in lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx

It is likely that 'username' needs encoding before sending; it can be done using 'encodeTextForLanguageTool' there.

Whoever decides to fix it, needs to get respective User ID, and test that it works.

Not setting to NEW, because can't test myself.
Comment 2 Commit Notification 2023-11-23 21:31:31 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/05d5181e2c19aca7e6098217ddb7065e02819a53

tdf#158117: encode the username sent to LanguageTool

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2023-11-24 15:30:36 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/a57c8fdeb21f4ee77763833a3c92ea337a649cda

tdf#158117: encode the username sent to LanguageTool

It will be available in 7.6.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Savannah Swift 2023-12-26 02:52:20 UTC Comment hidden (spam)
Comment 5 Mike Kaganski 2024-02-04 15:19:45 UTC
*** Bug 159551 has been marked as a duplicate of this bug. ***
Comment 6 MiaVardy 2024-09-06 12:09:55 UTC Comment hidden (spam)