| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Add $smime_pkcs7_default_smime_type config option This works around Outlook sending application/pkcs7-mime .p7m parts without a smime-type parameter. NeoMutt previously hardcoded an assumption that these were SignedData. This option allows selecting SignedData or EnvelopedData for missing-smime-type .p7m parts. Upstream-commit: 0d75d71a6 | 6 个月前 | |
bugprone: replace rewind()/setbuf() with checked equivalents rewind() and setbuf() give clang-tidy's bugprone-unsafe-functions check no way to detect failure. Replace with their exact behavioural equivalents that do: fseek()+clearerr() for rewind() (fseek alone doesn't clear the error indicator the way rewind() does), and setvbuf() for the one setbuf() call. Three sites (nntp.c, crypt_gpgme.c, smime.c) had the original rewind() as an unbraced single-statement if-body; braces added where the two-statement replacement needed them, since one would otherwise silently run unconditionally. Doesn't add explicit fseek()/setvbuf() return-value checking beyond what the codebase already does at nearby call sites -- that would be a separate, larger error-handling question, not addressed here. Confirmed via `clang-tidy -p . <file> --checks='-*,bugprone-unsafe-functions'` this clears all 76 warnings flatcap found on PR #4970 in this category. Full clean build and `make test` pass. AI assistance: written and verified by Claude Code (mechanical transform + manual review of all 76 sites for the brace hazard above), reviewed by chrisdebian before commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 3 个月前 | |
update copyright dates | 2 年前 | |
ncrypt: leave no output file open when decrypt_mime fails (#5056) smime_handle_entity() closed the caller's output file when the decrypted data was empty, and smime_class_decrypt_mime() then rewound and returned that closed FILE. Its callers reused or closed it again. Close the output file in smime_handle_entity() only when it opened it, and give every decrypt_mime() backend the same contract: on failure the output file is closed and NULL, as pgp_gpgme_decrypt_mime() already did. This also stops the decrypt failure paths in copy_email.c and recvattach.c from leaking the file. | 15 天前 | |
iwyu: fix includes | 4 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 4 个月前 | |
ncrypt: leave no output file open when decrypt_mime fails (#5056) smime_handle_entity() closed the caller's output file when the decrypted data was empty, and smime_class_decrypt_mime() then rewound and returned that closed FILE. Its callers reused or closed it again. Close the output file in smime_handle_entity() only when it opened it, and give every decrypt_mime() backend the same contract: on failure the output file is closed and NULL, as pgp_gpgme_decrypt_mime() already did. This also stops the decrypt failure paths in copy_email.c and recvattach.c from leaking the file. | 15 天前 | |
doxy: unify module names | 8 个月前 | |
doxy: unify module names | 8 个月前 | |
iwyu: fix includes | 4 个月前 | |
doxy: unify module names | 8 个月前 | |
module: pass ncrypt module data | 6 个月前 | |
update copyright dates | 2 年前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 5 个月前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 5 个月前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 5 个月前 | |
expando: rename RenderData to RenderCallback The struct doesn't contain any data, just callback functions. | 1 年前 | |
iwyu: fix headers | 1 年前 | |
ncrypt: add subkeys NULL check in gpgme_key_date_num() gpgme_key_date_num() accessed key->kobj->subkeys->timestamp without checking if subkeys is NULL. Sibling functions in the same file (gpgme_key_date at line 206, gpgme_key_length_num at line 289) correctly guard against NULL subkeys. Add the same ternary guard, returning 0 when subkeys is NULL. | 7 个月前 | |
iwyu: fix headers | 1 年前 | |
ncrypt/expando_pgp.c: use buf_addch() for single characters Replace buf_printf(buf, "%c", ...) with buf_addch(buf, ...) in pgp_entry_trust(), pgp_key_flags(), and pgp_pkey_flags(). Co-authored-by: Amp <amp@ampcode.com> | 8 个月前 | |
iwyu: fix headers | 1 年前 | |
ncrypt/expando_smime.c: reduce pool buffer usage In smime_command_certificate_path(), reduce from 3 pool buffers to 2 by writing directly to the output buffer instead of via an intermediate. Co-authored-by: Amp <amp@ampcode.com> | 8 个月前 | |
iwyu: fix headers | 1 年前 | |
menu: use the OP_QUIT from 'generic' Update lots of dialogs to use 'generic's OP_QUIT (`q`) rather than implement their own. - alias - attach - autocrypt - browser - compose - gpgme - mlist - pgp - postpone - query - smime | 4 个月前 | |
rename function files Rename some files for consistency: - ncrypt/gpgme_functions.c -> ncrypt/functions_gpgme.c - ncrypt/pgp_functions.c -> ncrypt/functions_pgp.c - ncrypt/smime_functions.c -> ncrypt/functions_smime.c | 4 个月前 | |
bugprone: add default cases for switch-missing-default-case Fixes the second of the three categories flatcap flagged as good candidates on #4970 (55 sites across 33 files, matching his count exactly). Each switch was read in full to determine the semantically correct default, not just silenced mechanically: - Most are op/command dispatchers or menu-choice switches (event->op, mw_multi_choice() results, single-letter responses) where the existing code already has an implicit fallback after the switch (a later return, or falling through to shared code) -- these get `default: break;` to make that explicit without changing behaviour. - A few (external.c, muttlib.c, send/send.c) explicitly mirror the existing "abort" case's behaviour, since leaving the loop/function state unchanged on an impossible value would otherwise risk an infinite loop or a silently-wrong return. - pattern/exec.c's two large op-table dispatchers already had an explicit "unknown op" error path after the switch; the new default falls through to it, matching the existing intent exactly. - A handful (pop/auth.c, pop/lib.c, pop/pop.c) switch on documented function return codes; checked each callee's own @retval doc comment to confirm every case was genuinely covered, and matched the default to whichever existing case already represents "no specific outcome" for that function. No case does more than reproduce behaviour the code already had implicitly -- this is a defensiveness/documentation change, not a behaviour change. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-switch-missing-default-case'` now reports 0 warnings across all 55 sites (was 55). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` clean on every changed file (one pre-existing, unrelated violation in autocrypt/gpgme.c confirmed via `git stash` before and after -- not introduced by this change). AI assistance: mechanical location of all 55 sites and the semantic analysis of each switch (tracing callee return contracts, existing fallback behaviour, and loop-safety implications) was done by Claude Code; I reviewed the reasoning and diff before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 2 个月前 | |
bugprone: add default cases for switch-missing-default-case Fixes the second of the three categories flatcap flagged as good candidates on #4970 (55 sites across 33 files, matching his count exactly). Each switch was read in full to determine the semantically correct default, not just silenced mechanically: - Most are op/command dispatchers or menu-choice switches (event->op, mw_multi_choice() results, single-letter responses) where the existing code already has an implicit fallback after the switch (a later return, or falling through to shared code) -- these get `default: break;` to make that explicit without changing behaviour. - A few (external.c, muttlib.c, send/send.c) explicitly mirror the existing "abort" case's behaviour, since leaving the loop/function state unchanged on an impossible value would otherwise risk an infinite loop or a silently-wrong return. - pattern/exec.c's two large op-table dispatchers already had an explicit "unknown op" error path after the switch; the new default falls through to it, matching the existing intent exactly. - A handful (pop/auth.c, pop/lib.c, pop/pop.c) switch on documented function return codes; checked each callee's own @retval doc comment to confirm every case was genuinely covered, and matched the default to whichever existing case already represents "no specific outcome" for that function. No case does more than reproduce behaviour the code already had implicitly -- this is a defensiveness/documentation change, not a behaviour change. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-switch-missing-default-case'` now reports 0 warnings across all 55 sites (was 55). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` clean on every changed file (one pre-existing, unrelated violation in autocrypt/gpgme.c confirmed via `git stash` before and after -- not introduced by this change). AI assistance: mechanical location of all 55 sites and the semantic analysis of each switch (tracing callee return contracts, existing fallback behaviour, and loop-safety implications) was done by Claude Code; I reviewed the reasoning and diff before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 2 个月前 | |
bugprone: add default cases for switch-missing-default-case Fixes the second of the three categories flatcap flagged as good candidates on #4970 (55 sites across 33 files, matching his count exactly). Each switch was read in full to determine the semantically correct default, not just silenced mechanically: - Most are op/command dispatchers or menu-choice switches (event->op, mw_multi_choice() results, single-letter responses) where the existing code already has an implicit fallback after the switch (a later return, or falling through to shared code) -- these get `default: break;` to make that explicit without changing behaviour. - A few (external.c, muttlib.c, send/send.c) explicitly mirror the existing "abort" case's behaviour, since leaving the loop/function state unchanged on an impossible value would otherwise risk an infinite loop or a silently-wrong return. - pattern/exec.c's two large op-table dispatchers already had an explicit "unknown op" error path after the switch; the new default falls through to it, matching the existing intent exactly. - A handful (pop/auth.c, pop/lib.c, pop/pop.c) switch on documented function return codes; checked each callee's own @retval doc comment to confirm every case was genuinely covered, and matched the default to whichever existing case already represents "no specific outcome" for that function. No case does more than reproduce behaviour the code already had implicitly -- this is a defensiveness/documentation change, not a behaviour change. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-switch-missing-default-case'` now reports 0 warnings across all 55 sites (was 55). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` clean on every changed file (one pre-existing, unrelated violation in autocrypt/gpgme.c confirmed via `git stash` before and after -- not introduced by this change). AI assistance: mechanical location of all 55 sites and the semantic analysis of each switch (tracing callee return contracts, existing fallback behaviour, and loop-safety implications) was done by Claude Code; I reviewed the reasoning and diff before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 2 个月前 | |
update copyright dates | 2 年前 | |
key: guarantee params of function dispatchers | 9 个月前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 5 个月前 | |
module: tidy cleanup Pass the Module Data to the Module on cleanup() | 6 个月前 | |
iwyu: fix includes | 4 个月前 | |
ncrypt: leave no output file open when decrypt_mime fails (#5056) smime_handle_entity() closed the caller's output file when the decrypted data was empty, and smime_class_decrypt_mime() then rewound and returned that closed FILE. Its callers reused or closed it again. Close the output file in smime_handle_entity() only when it opened it, and give every decrypt_mime() backend the same contract: on failure the output file is closed and NULL, as pgp_gpgme_decrypt_mime() already did. This also stops the decrypt failure paths in copy_email.c and recvattach.c from leaking the file. | 15 天前 | |
expando: add data domains and uids Define a set of data domains. These will map to the major structs, e.g. Mailbox, Email, Envelope. Define sets of IDs that map to struct members within a domain. Each UID is unique within its domain. Co-authored-by: Tóth János <gomba007@gmail.com> | 2 年前 | |
menu: move globals to MenuModuleData - store menu definitions and submenus on per-module data - update callers to fetch module data instead of extern globals - re-enable module init/cleanup where the data is now required | 6 个月前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 5 个月前 | |
Fix includes Reported-by: iwyu(1) Signed-off-by: Alejandro Colomar <alx@kernel.org> | 2 年前 | |
crypt: exit key prompt quietly on empty response The three 'ask for key' functions looped on mw_get_field() until the user either entered a matching key or hit Ctrl-G to abort. Treat an empty response as a quiet exit so the user need not abort the loop. - crypt_ask_for_key() - pgp_ask_for_key() - smime_ask_for_key() | 4 个月前 | |
module: pass data into helpers Update helper functions reached from module init/cleanup paths so callers pass the module-owned fields they use, or the module data pointer when several fields are needed. This removes extra neomutt_get_module_data() lookups from attach, autocrypt, color, conn, gui, history, hooks, key, menu, ncrypt, and sidebar helpers, and updates the affected tests to match. | 6 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 4 个月前 | |
doxy: document struct members Assisted-by: GitHub Copilot | 9 个月前 | |
bugprone: replace rewind()/setbuf() with checked equivalents rewind() and setbuf() give clang-tidy's bugprone-unsafe-functions check no way to detect failure. Replace with their exact behavioural equivalents that do: fseek()+clearerr() for rewind() (fseek alone doesn't clear the error indicator the way rewind() does), and setvbuf() for the one setbuf() call. Three sites (nntp.c, crypt_gpgme.c, smime.c) had the original rewind() as an unbraced single-statement if-body; braces added where the two-statement replacement needed them, since one would otherwise silently run unconditionally. Doesn't add explicit fseek()/setvbuf() return-value checking beyond what the codebase already does at nearby call sites -- that would be a separate, larger error-handling question, not addressed here. Confirmed via `clang-tidy -p . <file> --checks='-*,bugprone-unsafe-functions'` this clears all 76 warnings flatcap found on PR #4970 in this category. Full clean build and `make test` pass. AI assistance: written and verified by Claude Code (mechanical transform + manual review of all 76 sites for the brace hazard above), reviewed by chrisdebian before commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 3 个月前 | |
tweak #include guards Closes #1328 | 8 年前 | |
initialise things Ensure that pointers, structs and variables used as outparams are initialised. (some of variable types were obscured by typedefs) | 4 个月前 | |
update copyright dates | 2 年前 | |
drop config.h from headers only need it where there's a #if dependency or where config.h defines something like OFF_T | 8 个月前 | |
ncrypt: leave no output file open when decrypt_mime fails (#5056) smime_handle_entity() closed the caller's output file when the decrypted data was empty, and smime_class_decrypt_mime() then rewound and returned that closed FILE. Its callers reused or closed it again. Close the output file in smime_handle_entity() only when it opened it, and give every decrypt_mime() backend the same contract: on failure the output file is closed and NULL, as pgp_gpgme_decrypt_mime() already did. This also stops the decrypt failure paths in copy_email.c and recvattach.c from leaking the file. | 15 天前 | |
module: pass ncrypt module data | 6 个月前 | |
menu: move globals to MenuModuleData - store menu definitions and submenus on per-module data - update callers to fetch module data instead of extern globals - re-enable module init/cleanup where the data is now required | 6 个月前 | |
ncrypt: refactor sort_*.c Factor out the GPGME and PGP Key sort functions: - ncrypt/sort_gpgme.c - ncrypt/sort_pgp.c | 1 年前 | |
iwyu: fix includes | 4 个月前 | |
doxy: unify module names | 8 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 个月前 | ||
| 3 个月前 | ||
| 2 年前 | ||
| 15 天前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 15 天前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 4 个月前 | ||
| 8 个月前 | ||
| 6 个月前 | ||
| 2 年前 | ||
| 5 个月前 | ||
| 5 个月前 | ||
| 5 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 7 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 5 个月前 | ||
| 6 个月前 | ||
| 4 个月前 | ||
| 15 天前 | ||
| 2 年前 | ||
| 6 个月前 | ||
| 5 个月前 | ||
| 2 年前 | ||
| 4 个月前 | ||
| 6 个月前 | ||
| 4 个月前 | ||
| 9 个月前 | ||
| 3 个月前 | ||
| 8 年前 | ||
| 4 个月前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 15 天前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 1 年前 | ||
| 4 个月前 | ||
| 8 个月前 |