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

vcard: Fix whitespace handling in line cont's #9637

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

respiranto
Copy link
Contributor

Previously, multiple whitespace characters at the start of a continuation line would all be dropped, instead of only the first one.

Also,

  • restrict line continuation characters to SPACE and TAB.

Note that, like before, this identifies the CR (\r) character with the empty string, and thereby notably does not require a CRLF (\r\n) sequence (which is mandated by RFCs 2426, 2425) for line termination (i.e., \n suffices).

Fixes: Bug 1 of issue #9593.

Previously, multiple whitespace characters at the start of a
continuation line would all be dropped, instead of only the first one.

Also,
 - restrict line continuation characters to SPACE and TAB.

Note that, like before, this identifies the CR (`\r`) character with the
empty string, and thereby notably does not require a CRLF (`\r\n`)
sequence (which is mandated by RFCs 2426, 2425) for line termination
(i.e., `\n` suffices).

Fixes: Bug 1 of issue roundcube#9593.
@pabzm
Copy link
Member

pabzm commented Sep 15, 2024

Thank you very much! The failing tests are unrelated to your changes, I guess. I'll try to run them again later, since it looks like a temporary problem.

If you feel up to it I'd really celebrate if you would add a unit-test to check the now correct behaviour!

@pabzm
Copy link
Member

pabzm commented Sep 16, 2024

@alecpl The CI fails because the TLS-cert of git.kolab.org expired 2 days ago. Is there maybe anything you can do about that?

@respiranto
Copy link
Contributor Author

respiranto commented Sep 16, 2024

Test added.

Running the tests locally, I got the following, seemingly unrelated failure:

1) Roundcube\Tests\Framework\ImapTest::test_sort_folder_list
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
     0 => 'INBOX',
     1 => 'INBOX.Drafts',
     2 => 'INBOX.Sent',
-    3 => 'INBOX.sub',
-    4 => 'INBOX.Trash',
+    3 => 'INBOX.Trash',
+    4 => 'INBOX.sub',
     5 => 'Drafts',
     6 => 'Sent',
     7 => 'INBOX.Junk',

/home/u/roundcubemail/tests/Framework/ImapTest.php:148

@pabzm
Copy link
Member

pabzm commented Sep 17, 2024

That sorting failure is unrelated, don't worry about it!

@pabzm
Copy link
Member

pabzm commented Sep 17, 2024

Have a look at the Coding Style check errors, please.

@respiranto
Copy link
Contributor Author

Fixed coding style errors.

@pabzm pabzm requested review from alecpl and pabzm September 18, 2024 11:01
Copy link
Member

@pabzm pabzm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you very much for your contribution!

@alecpl alecpl merged commit 6159ebe into roundcube:master Sep 18, 2024
16 checks passed
alecpl pushed a commit that referenced this pull request Sep 18, 2024
* vcard: Fix whitespace handling in line cont's

Previously, multiple whitespace characters at the start of a
continuation line would all be dropped, instead of only the first one.

Also,
 - restrict line continuation characters to SPACE and TAB.

Note that, like before, this identifies the CR (`\r`) character with the
empty string, and thereby notably does not require a CRLF (`\r\n`)
sequence (which is mandated by RFCs 2426, 2425) for line termination
(i.e., `\n` suffices).

Fixes: Bug 1 of issue #9593.

* vcard: Add test for #9593/1

* Fix coding style
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

Successfully merging this pull request may close these issues.

3 participants