cpython icon indicating copy to clipboard operation
cpython copied to clipboard

bpo-13940: imaplib: All string arguments are now quoted when necessary.

Open bearbin opened this issue 6 years ago • 9 comments

Additionally, raise an error when given CRLF in arguments (this is invalid by the IMAP spec). Add tests for the above behaviour.

https://bugs.python.org/issue13940

bearbin avatar Apr 06 '18 09:04 bearbin

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

the-knights-who-say-ni avatar Apr 06 '18 09:04 the-knights-who-say-ni

My email address didn't match up with the one I used for the CLA. I've now updated the commit to have the correct email.

bearbin avatar Apr 06 '18 09:04 bearbin

Looks good, great help for imaplib! Thank you. +1

mcepl avatar Apr 21 '18 08:04 mcepl

Any chance this PR could get a review?

bearbin avatar Jul 06 '18 09:07 bearbin

Any chance this PR could get a review?

I usually get best results when asking in the business hours on #python-dev on Freenode. And of course, fixing that problem with NEWS would help as well. Everybody prefers to review PRs in green.

mcepl avatar Jul 06 '18 10:07 mcepl

Any chance of getting some movement on this? The bug is a serious regression (2.x handles the quoting correctly) and it was reported over seven years ago. 🙁 We do want folks to migrate to Python 3, right? 😃

bkline avatar May 23 '19 12:05 bkline

Also, I should point out that I believe the way the patch is currently implemented is a breaking change, beyond the bit about CRLF rejection. The documentation (before the patch is applied) says that the quoting will not be applied if the argument is already enclosed in double quotes, and that's how it was implemented in 2.7 when the quoting was actually done correctly. So anyone who has run into this bug in 3.x will have worked around it by enclosing (for example) folder names in double quotes. It's possible that I'm misreading the code in the patch (though that seems unlikely, given the corresponding change the patch applies to the documentation), but it seems that the patch will add a duplicate set of double quotes to an arg which is already quoted.

bkline avatar May 23 '19 13:05 bkline

@bearbin, I think you need to make some changes to get this pull request in. The contested parts seem to be

  • password should always be quoted
  • quote only if not quoted already (Python 2.7 does so)
  • can you do without the MapCRLF change?

rpuntaie avatar Aug 29 '20 08:08 rpuntaie

This PR is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Aug 16 '22 00:08 github-actions[bot]