Abhilash Raj added the comment:
I have tried to document the issue in the patch as discussed.
David: Do you think I should also add an example in walk() method
to demonstrate that it does not iterate over a 'message/rfc822' part
even though it is multipart?
--
keywords: +patch
nosy
Abhilash Raj added the comment:
Sorry, my bad. I was a little confused. I have updated the patch and
also added the example explicitly.
--
Added file: http://bugs.python.org/file35174/email-1.patch
___
Python tracker rep...@bugs.python.org
http
Abhilash Raj added the comment:
I read the discussion on issue #21079. Does this issue still needs a patch? If
yes I am willing to write one.
--
nosy: +abhilash.raj
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21083
Abhilash Raj added the comment:
I have attached my patch. Reviews?
--
keywords: +patch
Added file: http://bugs.python.org/file35177/c_d.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21083
Abhilash Raj added the comment:
I have updated the patch. The header with mime parameter 'filename' in addition
to header value is already added, will that not be enough?
--
Added file: http://bugs.python.org/file35178/c_d-revised.patch
___
Python
Abhilash Raj added the comment:
I would like to work on this issue, but I would need a little help to start
working on this feature.
--
nosy: +abhilash.raj
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
Abhilash Raj added the comment:
David: I had a look at the examples and documentation as you said. I found some
support for multipart/related in the form of `add_related` and `set_related`
methods. But I am still confused on how to make content_manager recognize
miltipart/related messages
Abhilash Raj added the comment:
Will the building of that 'dict' really be that difficult? Can we not walk over
all the attachments and simply map cid to name of the attachment? All
attachments have to have different names if I am right
Abhilash Raj added the comment:
David: How does this API look?
https://gist.github.com/maxking/2f37bae7875dde027e3c
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
Abhilash Raj added the comment:
David: What about his API then?
https://gist.github.com/maxking/b3ed4f54674e5f480275
Here cids are generated behind the scenes when the html part is added and those
cids are assigned to the attachments on the first come basis?
Like {0} is replaced by the cid
New submission from Abhilash Raj:
After decoding percentage encoded `name` and `values` in the query string, it
tries to `_coerce_result` or encode the result to ascii (which is the value of
_implicit_encoding).
```
File "/usr/lib/python3.6/urllib/parse.py", line 691, in parse_qsl
Abhilash Raj <raj.abhila...@gmail.com> added the comment:
I understand that the line endings are meant for "outputs", but what
constitutes as output in this case?
I now see that `EmailMessage.as_string()` gives me `\r\n` as line endings and,
which is probably what yo
New submission from Abhilash Raj <raj.abhila...@gmail.com>:
According to the documentation, email.policy.SMTP and .SMTPUTF8 should have
CRLF (`\r\n`) as line endings for text/plain parts.
However, a new message parsed using message_from_binary_file with
policy.SMTPUTF8 has `\n` a
Abhilash Raj <raj.abhila...@gmail.com> added the comment:
Well, I myself missed the "serialization" part, so it probably was my mistake.
Maybe a :note: saying line endings are only added in serialized outputs like
the one obtained from `as_string()` or `as_bytes()` but not f
Abhilash Raj added the comment:
Would it then make sense to add a similar flag, keep_blank_values, in urlencode
to achieve similar behavior as parse_qas?
--
___
Python tracker
<https://bugs.python.org/issue33
Abhilash Raj added the comment:
Ah! But blank lists aren't.
That makes sense! Thank you!
--
___
Python tracker
<https://bugs.python.org/issue33690>
___
___
Change by Abhilash Raj :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue33690>
___
___
Python-bugs-list
New submission from Abhilash Raj :
When using `urllib.parse.urlencode` it is impossible to pass an empty list when
doseq=True.
So, I see the following behavior when using urlencode:
In [3]: urlencode({'key': ['value']}, doseq=True)
Out[3]: 'key=value'
In [4]: urlencode({'key': []}, doseq
Abhilash Raj <raj.abhila...@gmail.com> added the comment:
I should also mention probably that I went ahead and made changes to make this
work and I can pass most of the tests, one is failing due to missing `\n`
character in the header's value obtained from `msg.get_all('Received')`.
New submission from Abhilash Raj <raj.abhila...@gmail.com>:
Since Python 3.6 the new EmailMessage API seems to be the default but
mailbox.Message still subclasses from the old email.message.Message API.
It would be nice to get EmailMessage from mailbox so that one can rely on the
new m
Abhilash Raj <raj.abhila...@gmail.com> added the comment:
Can you suggest what would be the best way go about doing that?
Given that mailbox.Message subclasses from Message, I am not sure how to
proceed about this to make this configurable with a flag.
I haven't yet made a PR, but
Abhilash Raj added the comment:
Moving the conversation here from https://github.com/python/cpython/pull/12732
for David.
I previously suggested HeaderParseError because of the fact that we could fail
to parse a value into a Header Object in the above scenario.
@r.david.murray Would
Abhilash Raj added the comment:
I was wrong about the parsing error, it looks like length from the policy isn't
used when parsing.
>>> from email.policy import default
>>> from email import message_from_string
>>> p = default.clone(max_line_length=10)
&g
Abhilash Raj added the comment:
Just for reference DKIM-Signature header is defined in RFC 6376 and the BNF
description for the header is mentioned here
(https://tools.ietf.org/html/rfc6376#section-3.5).
It is a bit long so I am not copy-pasting it here.
I might take a stab at writing
Change by Abhilash Raj :
--
pull_requests: +13300
___
Python tracker
<https://bugs.python.org/issue33524>
___
___
Python-bugs-list mailing list
Unsubscribe:
Abhilash Raj added the comment:
According to RFC 2047 5(1)
> However, an 'encoded-word' that appears in a
header field defined as '*text' MUST be separated from any adjacent
'encoded-word' or 'text' by 'linear-white-space'.
So, it seems like splitting on whitespace is the right th
Abhilash Raj added the comment:
The solution replaces RFC 20147 chrome for utf-8 and q to make sure there is a
space before ew, it wouldn't replace in case of any other charset/cte pair.
value = value.replace("=?UTF-8?Q?=20", " =?UTF-8?Q?")
Abhilash Raj added the comment:
Ah, I wrongly assumed the patch had the same thing.
Sorry about that.
--
___
Python tracker
<https://bugs.python.org/issue21
Change by Abhilash Raj :
--
keywords: +patch
pull_requests: +13505
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/13598
___
Python tracker
<https://bugs.python.org/issu
Abhilash Raj added the comment:
IMO, this is a duplicate of https://bugs.python.org/issue33529 (which was
reported before this one was).
I have tested that the fix for bpo-33529 does indeed fix the test case which
has been provided above.
The Pull Request for bpo-33529 has been merged, so
Change by Abhilash Raj :
--
nosy: +maxking
___
Python tracker
<https://bugs.python.org/issue34025>
___
___
Python-bugs-list mailing list
Unsubscribe:
Abhilash Raj added the comment:
How about we go a slightly different route than suggested by jpic and instead
of returning a None value, we return the entire rest of the string as the
domain? That would take care of the security issue since it won't be a valid
domain anymore.
msg
Abhilash Raj added the comment:
I am not sure which 2nd PR are we talking about here?
The reported exception stems from Lib/email/feedparser.py#L323 and same is
fixed in PR (https://github.com/python/cpython/pull/13598) for bpo-30835
Abhilash Raj added the comment:
This is a dupe of https://bugs.python.org/issue30835, which has an attached PR.
I have verified the provided test case is fixed by the PR for bpo-30835.
--
nosy: +maxking
___
Python tracker
<https://bugs.python.
Change by Abhilash Raj :
--
pull_requests: +13782
pull_request: https://github.com/python/cpython/pull/13909
___
Python tracker
<https://bugs.python.org/issue36
Change by Abhilash Raj :
--
pull_requests: +13783
pull_request: https://github.com/python/cpython/pull/13910
___
Python tracker
<https://bugs.python.org/issue36
Abhilash Raj added the comment:
slight typo in the previous message:
s/fallback to `get_unstructured` /fallback to *something*/g
--
___
Python tracker
<https://bugs.python.org/issue34
Abhilash Raj added the comment:
I agree that we currently abandon parsing (raise `HeaderParseError`) when we
encounter a unexpected token when parsing domain (expected token is
dot-atom-text).
However, that mechanism is meant to signal the higher level parser that we
should look
Abhilash Raj added the comment:
I don't know if we can make the API consistent between parseaddr and the
parsing header value since they are completely different even right now. Like
you already noticed there is no way to register defects and instead parseaddr
returns ('', '') to denote
Abhilash Raj added the comment:
I can't reproduce this issue on the latest master branch. This seems to be
fixed as a part of a different PR I suppose.
>>> import email
>>> msg = email.message_from_string("From: Bonifac Karaka :
boni...@gmail.com")
Abhilash Raj added the comment:
For the record, this is how I tested using the master branch:
>>> msg = email.message_from_string(' To: (Recipient list suppressed)')
>>> msg['To']
>>> import email.policy
>>> msg = email.message_from_string(' To: (Reci
Abhilash Raj added the comment:
I don't think this is an issue anymore, I guess this was fixed as a part of
some other PR.
I tested this out on a recent branch:
>>> import email
>>> msg = email.message_from_string('From: Abhilash
')
>>> msg['From
Abhilash Raj added the comment:
Nevermind, I was wrong, I was able to reproduce it:
>>> msg = email.message_from_string('To: (Recipient list suppressed)',
>>> policy=email.policy.default))
File "", line 1
SyntaxError: unmatched ')'
>>> msg = email.mes
Abhilash Raj added the comment:
I wasn't able to reproduce this on the latest master. Probably fixed as a part
of some other PR.
>>> msg = email.message_from_string('ReplyTo: ""')
>>> msg
>>> msg['ReplyTo']
'""'
I t
Abhilash Raj added the comment:
I can't reproduce this problem with the latest master branch, it was perhaps
fixed with some other PR.
This is also a dupe of bpo-31445.
@barry, @david: I think this issue can be closed.
--
nosy: +maxking
Change by Abhilash Raj :
--
nosy: +maxking
___
Python tracker
<https://bugs.python.org/issue4963>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Abhilash Raj :
--
nosy: +maxking
___
Python tracker
<https://bugs.python.org/issue26543>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Abhilash Raj :
--
pull_requests: +13968
pull_request: https://github.com/python/cpython/pull/14119
___
Python tracker
<https://bugs.python.org/issue33
Change by Abhilash Raj :
--
pull_requests: +14194
pull_request: https://github.com/python/cpython/pull/14380
___
Python tracker
<https://bugs.python.org/issue33
Change by Abhilash Raj :
--
pull_requests: +14195
pull_request: https://github.com/python/cpython/pull/14381
___
Python tracker
<https://bugs.python.org/issue33
Abhilash Raj added the comment:
I have made the requested changes on PR.
--
___
Python tracker
<https://bugs.python.org/issue21315>
___
___
Python-bugs-list m
Abhilash Raj added the comment:
I have made the requested changes on PR.
David, can you please review again?
--
___
Python tracker
<https://bugs.python.org/issue35
Change by Abhilash Raj :
--
pull_requests: +13335
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue21315>
___
___
Python-bugs-list mai
Change by Abhilash Raj :
--
keywords: +patch
pull_requests: +13307
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Abhilash Raj added the comment:
I have created https://github.com/python/cpython/pull/13397 for this. For now,
it only parses Message-ID header.
I do plan to add support for other Identification headers soon, perhaps in a
2nd PR.
--
nosy: +maxking
stage: patch review -> ne
Abhilash Raj added the comment:
Created a Pull Request for this.
https://github.com/python/cpython/pull/13425
--
___
Python tracker
<https://bugs.python.org/issue21
New submission from Abhilash Raj :
from email.parser import BytesParser, Parser
from email.policy import default
payload = 'Content-Type:x;\x1b*="\'G\'\\"""""'
msg = Parser(policy=default).parsestr(payload)
print(msg.get('content-type'))
When trying to re
Abhilash Raj added the comment:
Thanks for the explanation Terry!
In this case, value becomes None (I think), which causes the IndexError.
--
___
Python tracker
<https://bugs.python.org/issue37
Change by Abhilash Raj :
--
pull_requests: +14588
pull_request: https://github.com/python/cpython/pull/14794
___
Python tracker
<https://bugs.python.org/issue37
Change by Abhilash Raj :
--
pull_requests: +14201
pull_request: https://github.com/python/cpython/pull/14387
___
Python tracker
<https://bugs.python.org/issue29
Abhilash Raj added the comment:
@Victor: This is already backported to 3.6. I am not sure about what gets
backported to 3.5 right now, I don't even see a 'Backport to 3.5' label on
Github (which made me think we are discouraged to backport to 3.5). I can work
on a manual backport if needed
Abhilash Raj added the comment:
You have correctly identified that "=aa" is detected as a encoded word and
causes the get_encoded_word to fail.
However, "=?utf-8?q?somevalue?=aa" should ideally get parsed as "somevalueaa"
and not "=?utf-8?q?someval
Abhilash Raj added the comment:
Although, the 2nd bug I spoke of is kind of speculative, I haven't been able to
find a test case which matches rfc2047_matcher but raises exception with
get_encoded_word (after, ofcourse, the first bug is fixed), which the only way
to cause an infinite loop
Abhilash Raj added the comment:
I meant, =aa is identified as encoded word escape
--
___
Python tracker
<https://bugs.python.org/issue37764>
___
___
Python-bug
Abhilash Raj added the comment:
Adding security label since this can cause DOS.
--
type: -> security
___
Python tracker
<https://bugs.python.org/issu
Abhilash Raj added the comment:
Closing this since teh PRs are merged.
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
Abhilash Raj added the comment:
Yes, I am gonna work on a PR.
--
___
Python tracker
<https://bugs.python.org/issue37826>
___
___
Python-bugs-list mailin
Change by Abhilash Raj :
--
keywords: +patch
pull_requests: +14964
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/15243
___
Python tracker
<https://bugs.python.org/issu
New submission from Abhilash Raj :
Looking at the docs, I couldn't find the `raise from` documentation anywhere in
the Errors and Exceptions page (https://docs.python.org/3/tutorial/errors.html)
page, which seems to be the landing page for Python Exceptions.
I do see however
Change by Abhilash Raj :
--
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.4, Python 3.5, Python
3.6
___
Python tracker
<https://bugs.python.org/i
Abhilash Raj added the comment:
2.7 needs a separate PR since the code is very different and my familiarity
with 2.7 version of email package is very limited.
I am going to work on a separate patch later this week for 2.7.
--
___
Python tracker
Change by Abhilash Raj :
--
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8 -Python 3.3, Python 3.4, Python 3.5
___
Python tracker
<https://bugs.python.org/i
Abhilash Raj added the comment:
I am slightly confused if this should be backported to bugfix branches since
this is technically a new feature, the ability to parse Message-ID field.
I would love to see what David and Barry think about
Change by Abhilash Raj :
--
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8, Python 3.9 -Python 3.5, Python 3.6
___
Python tracker
<https://bugs.python.org/i
Change by Abhilash Raj :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue37826>
___
___
Pyth
Change by Abhilash Raj :
--
pull_requests: +15036
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/15317
___
Python tracker
<https://bugs.python.org/issu
Abhilash Raj added the comment:
Created a backport PR for 3.5.
--
stage: patch review -> resolved
___
Python tracker
<https://bugs.python.org/issu
Abhilash Raj added the comment:
Removing 2.7 which only accepts security patches.
--
nosy: +maxking
versions: -Python 2.7
___
Python tracker
<https://bugs.python.org/issue32
Change by Abhilash Raj :
--
pull_requests: +15138
pull_request: https://github.com/python/cpython/pull/15446
___
Python tracker
<https://bugs.python.org/issue37
Abhilash Raj added the comment:
I manually created a backport PR for 3.5 and added Larry as a reviewer.
https://github.com/python/cpython/pull/15446
--
___
Python tracker
<https://bugs.python.org/issue37
Change by Abhilash Raj :
--
pull_requests: +15344
pull_request: https://github.com/python/cpython/pull/15686
___
Python tracker
<https://bugs.python.org/issue37
Abhilash Raj added the comment:
New changeset 6ad0a2c45f78020f7994e47620c1cf7b225f8197 by Abhilash Raj in
branch '3.8':
[3.8] bpo-37764: Fix infinite loop when parsing unstructured email headers.
(GH-15239) (GH-15686)
https://github.com/python/cpython/commit
Change by Abhilash Raj :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue37764>
___
___
Pyth
Abhilash Raj added the comment:
I think so, yes.
Also, while you are at it, can you also close bpo-35939 with a comment that
points to this issue and the right PR for the fix?
--
___
Python tracker
<https://bugs.python.org/issue22
Change by Abhilash Raj :
--
resolution: -> fixed
___
Python tracker
<https://bugs.python.org/issue37764>
___
___
Python-bugs-list mailing list
Unsubscrib
Abhilash Raj added the comment:
Martin: Can you please create a PR for the added patch? If you are busy, I can
do that for you, just wanted to ask before I do :)
I am going to remove "easy" label from this issue, which IMO it clearly isn't
given 4 years of history to catch up on
Abhilash Raj added the comment:
Merged in 2.7, closing this one finally!
Thanks to everyone who helped with this :)
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bug
Change by Abhilash Raj :
--
pull_requests: +14799
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/15044
___
Python tracker
<https://bugs.python.org/issu
Abhilash Raj added the comment:
This does look like a side-effect of the commit mentioned by mytran.
The issues seems to be that email._header_value_parser.get_unstructured
wrongfully assumes that anything leading with '=?' would be a valid rfc 2047
encoded word.
This is a smaller test
Change by Abhilash Raj :
--
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issue37764>
___
___
Python-bugs-list mailing list
Unsubscribe:
Abhilash Raj added the comment:
I have proposed a PR for this: https://github.com/python/cpython/pull/14794
Reviews are welcome.
--
___
Python tracker
<https://bugs.python.org/issue37
Change by Abhilash Raj :
--
pull_requests: +14607
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14813
___
Python tracker
<https://bugs.python.org/issu
Abhilash Raj added the comment:
New changeset 2702638eabe5f7b25f36d295f0ad78cb8d4eda05 by Abhilash Raj (Michael
Selik) in branch 'master':
bpo-34002: Minor efficiency and clarity improvements in email package. (GH-7999)
https://github.com/python/cpython/commit
Abhilash Raj added the comment:
PR is now merged.
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
Abhilash Raj added the comment:
I just wanted to report before I forgot and hence missed some details, turns
out the bug report was slightly wrong too. The testcase I provided wasn't right.
Here is the right test case to reproduce the exception with master:
# bpo_37491.py
from email.parser
Abhilash Raj added the comment:
New changeset 3ae4ea1931361dd2743e464790e739d9285501bf by Abhilash Raj in
branch 'master':
bpo-38708: email: Fix a potential IndexError when parsing Message-ID (GH-17504)
https://github.com/python/cpython/commit/3ae4ea1931361dd2743e464790e739d9285501bf
Abhilash Raj added the comment:
Closing this as fixed.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Abhilash Raj added the comment:
Closing this as fixed.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Abhilash Raj added the comment:
New changeset 68157da8b42b26408af5d157d2dba4fcf29c6320 by Abhilash Raj in
branch 'master':
bpo-38698: Add a new InvalidMessageID token to email header parser. (GH-17503)
https://github.com/python/cpython/commit/68157da8b42b26408af5d157d2dba4fcf29c6320
Abhilash Raj added the comment:
Thanks David! I applied the fixes as per your comments, can you please take
another look?
--
___
Python tracker
<https://bugs.python.org/issue39
1 - 100 of 139 matches
Mail list logo