summaryrefslogtreecommitdiff
path: root/alot
Commit message (Collapse)AuthorAge
...
| * | rename parameter of Command.apply methodPatrick Totzke2018-03-11
| | | | | | | | | | | | | | | | | | .. from "caller" to "ui", as used throughout all subclasses. The inconsistent naming causes the codacity code checker (pylint) to complain every time we add a new command subclass.
| * | Merge pull request #1158 from dcbaker/wip/fix-bad-signature-encryptedDylan Baker2018-03-05
| |\ \ | | | | | | | | crypto: Handle message that is encrypted, but the signature is invalid
| | * | crypto: Handle message that is encrypted, but the signature is invalidDylan Baker2017-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One case of this would be not having the public key of the signer. If the verification of the signatures fails, then use the signatures from the error, and try to redecrypt without verification. I have no tests yet, and this probably deserves tests. Fixes #1157
* | | | db/utils: decoded_headers will be passed str not bytesDylan Baker2018-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I had made the assumption early on that this would get bytes, but when I added `assert isinstance(header, bytes)` alot would crash on startup, changing `bytes` to `str` fixed that. I noticed this when trying to fix the warning generated in the logging call.
* | | | db/utils: Update docstring for message_from_bytesDylan Baker2018-03-06
| | | |
* | | | USe get_payload.decode instead of decoding ourselves.Dylan Baker2018-03-06
| | | |
* | | | drop bytes support from AddressDylan Baker2018-03-06
| | | | | | | | | | | | | | | | | | | | | | | | We don't want to be comparing bytes anyway, the decode would use utf-8, and that isn't right. Instead make the caller convert to a str of Address first.
* | | | utils: Fix types for add_signature_headerDylan Baker2018-03-06
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | currently _handle_signatures will pass `False~ for the error_msg if there is no error, but the documentation for add_signature_headers says it only accepts strings. Don't do either of these, instead use None if there is no error, otherwise a string, and updated the assert and documentation to match.
* | | Use urwid.util.detected_encoding instead of try_decodeDylan Baker2018-03-06
| | | | | | | | | | | | | | | Commands running in a subprocess should return the terminal encoding so we don't need to guess their encoding.
* | | use helper.try_decode instead of guess_encodingDylan Baker2018-03-06
| | | | | | | | | | | | basically just remove hand rolling what try_decode does.
* | | Merge branch 'master' into py3kDylan Baker2018-03-05
|\| | | | | | | | | | | | | | This requires regenerating the accounts_table docs, as they've changed for python 3.
| * | Merge pull request #1218 from mjg/tag-replied-passedDylan Baker2018-03-05
| |\ \ | | | | | | | | Tag replied passed
| | * | implement replied and passed tagsMichael J Gruber2018-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | maildir knows R and P flags which denote messages that have been replied to resp. passed on (fowarded, bounced). They correspond to IMAP flags \Replied and $Forwarded which are used by many clients and by synchronisation software. E.g., mbsync syncs \Replied to R, a patch for P is pending. Implement replied_tags and passed_tags for alot which work similar to sent_tags: sent_tags tags the sent message; replied_tags (resp. passed_tags) tags the message being replied to (resp. being fowarded). Basically, setting the replied_tags config to `replied` and replying to a message has the same effect as doing `tag replied; reply`, but the latter would tag even sending the reply is aborted or fails. The implementation in this patch makes sure that the tagging is done only if and when the reply resp. forward has been sent successfully.
| | * | provide defaults and doc for draft_tagsMichael J Gruber2018-03-05
| | | | | | | | | | | | | | | | | | | | draft_tags works the same way as sent_tags, so provide the same defaults and doc.
| | * | remove superfluous list() for ConfigObjMichael J Gruber2018-03-05
| | | | | | | | | | | | | | | | | | | | | | | | force_list() converts single items to lists already. Thus, remove a superfluous list() that could be mistaken for converting a single string into a list of chars.
* | | | Merge branch 'master' into py3kDylan Baker2018-03-02
|\| | |
| * | | CompleteEdit: go up when the up key is pressedDylan Baker2018-03-01
| |/ / | | | | | | | | | | | | | | | | | | The code currently uses "cursor up", which seems wrong to me. This corrects searching through prompt history only moving in one direction. Fixes #1216
* | | When writing a file for mailcap write it in as bytesDylan Baker2018-03-02
| | | | | | | | | | | | | | | | | | | | | otherwise when we convert to utf-8 some programs (like w3m) honor the encoding parameter in the HTML itself, which is now not correct. I'm not sure if this is going to have side effects for other programs that expect their data to be encoded in the terminal encoding.
* | | fix piping messages via stdinDylan Baker2018-03-02
| | |
* | | globals: try to fix debian magic errorDylan Baker2018-03-01
| | | | | | | | | | | | I can't reproduce this with arch, but it does reproduce in CI.
* | | commands/globals: fix bindings help for py3kDylan Baker2018-03-01
| | |
* | | fix base64, 8bit, and quoted-printable properly.Dylan Baker2018-03-01
| | |
* | | Revert "If there are errors in the decoding the content replace"Dylan Baker2018-03-01
| | | | | | | | | | | | This reverts commit c7ec811b45d3c6c964cffbfc585f02d54d373ef3.
* | | possibly fix opening emails encoded as non-ascii/non-unicodeDylan Baker2018-03-01
| | |
* | | If there are errors in the decoding the content replaceDylan Baker2018-03-01
| | | | | | | | | | | | | | | I've run into a couple of emails now with badly formatted utf-8, so let's use `errors='replace'`.
* | | fix messages with content transfer encoding in py3kDylan Baker2018-03-01
| | | | | | | | | | | | | | | | | | | | | | | | the change to raw payload makes sense to me, we need to tell it to decode using the content-transfer-encoding, and then transform tat back into a str. the need to join with '' instead of ' ' doesn't.
* | | fix sending encrypted messages in py3kDylan Baker2018-03-01
| | |
* | | fix sending signed messages with py3kDylan Baker2018-03-01
| | |
* | | fix completions for py3kDylan Baker2018-03-01
| | |
* | | fix tagging and untagging.Dylan Baker2018-03-01
| | |
* | | fix a bunch of utils tests for py3kDylan Baker2018-03-01
| | | | | | | | | | | | | | | There are a few that are still broken because of bytes to unicode conversion, and this may not all be correct, but most of the tests pass
* | | helper: py3k fixesDylan Baker2018-03-01
| | |
* | | alot/command/envelope: py3k fixesDylan Baker2018-03-01
| | |
* | | alot/command/globals: fix py3kDylan Baker2018-03-01
| | |
* | | alot/commands/thread: Fix py3k issuesDylan Baker2018-03-01
| | |
* | | alot/db/message: fix for py3kDylan Baker2018-03-01
| | |
* | | settings/manager: fix managerDylan Baker2018-03-01
| | |
* | | crypto: use bytes instead of strDylan Baker2018-03-01
| | | | | | | | | | | | | | | | | | | | | | | | The crypto code shouldn't use unicode strings, it should use byte strings. The problem with using unicode strings (and doing the conversion internally), is that the crypto code doesn't know what the encoding should be. We can guess but it's better to just do bytes in bytes out, and let the calling code deal with encoding and decoding.
* | | Fix cryptoDylan Baker2018-03-01
| | | | | | | | | | | | | | | | | | This makes me a little nervous. I wonder if we're better off leaving the bits that gpg works with as bytes while gpg is working with them and do the string transformation later.
* | | helper: add a helper to guess the encoding a of a blob and decode itDylan Baker2018-03-01
| | |
* | | fix account.pyDylan Baker2018-03-01
| | |
* | | fix rebasing errorsDylan Baker2018-03-01
| | |
* | | fix another unicode -> str instanceDylan Baker2018-03-01
| | |
* | | py3k: Replace 'e.message' with 'str(e)' when handling exceptionsDylan Baker2018-03-01
| | |
* | | py3k: use a concrete list when modifying dict.Dylan Baker2018-03-01
| | |
* | | py3k: convert email.Utils to email.utilsDylan Baker2018-03-01
| | |
* | | hack alot.db.utils.decode_header until it works.Dylan Baker2018-03-01
| | |
* | | py3k: only pass str instances to shlexDylan Baker2018-03-01
| | |
* | | replace xrange with rangeDylan Baker2018-03-01
| | | | | | | | | | | | In python 3 xrange is range, to get a list one must wrap range in list.
* | | repalces uses of dict.iter* with non-iter versionsDylan Baker2018-03-01
| | | | | | | | | | | | | | | | | | | | | in python3 dict.{keys,items,values} return views, which are similar to iterators without some of the caveats about modifying the underlying object. The iter* and view* methods have been removed, instead one warps dict.x in iter or list to get those types.