Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ releases and the AppStream metadata.
photo that failed to render removed photos from every later notification
until ZapZap restarted. Now it only learns from fields it actually sent, with
a regression test.
- Stop the repeated-download dialog from saving a permanent block (#1006,
#992). Choosing Block, pressing Esc or closing the dialog stored a
permanent block, after which every later WhatsApp download was refused with
no dialog to undo it, so only the first download of each session worked
until the permission was reset in Settings. Those answers now refuse only
the current request and the dialog appears again; Always allow is still
remembered and an already saved block can still be cleared with Reset.

## [7.5.1] - 2026-10-15

Expand Down
2 changes: 1 addition & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ documente o que ele protege.
| `test_dictionary_manager.py` | store próprio, migração, catálogo/cache, rede segura, downloads atômicos, importação/remoção, diálogo compartilhado, provisionamento único do idioma do sistema e ausência de dicionários nos pacotes oficiais |
| `test_dictionary_options.py` | descoberta dinâmica, nomes amigáveis, ordenação, redimensionamento e fallback de dicionários personalizados |
| `test_display_backend.py` | seleção automática/forçada do backend Qt, precedência de ambiente/CLI/plataforma e migração da chave Wayland legada |
| `test_download_settings.py` | memória opcional de Salvar como por conta, Esc, cancelamento, destino padrão, modos persistidos, permissão múltipla sem bypass temporal, fila global, ordem/dispensa de itens, indicador compacto, ícones nativos de tipo, elisão de nomes, sanitização de alvos e abertura separada de PDF/imagens por MIME verificado |
| `test_download_settings.py` | memória opcional de Salvar como por conta, Esc, cancelamento, destino padrão, modos persistidos, permissão múltipla sem bypass temporal, bloqueio pontual sem gravar bloqueio permanente e Permitir sempre mantido, fila global, ordem/dispensa de itens, indicador compacto, ícones nativos de tipo, elisão de nomes, sanitização de alvos e abertura separada de PDF/imagens por MIME verificado |
| `test_documentation_structure.py` | camadas de UI, ciclo numérico versionado do changelog e sincronização entre árvore, inventários técnicos, convenção de commits e guia para agentes |
| `test_donations_page.py` | URLs HTTPS oficiais, fallback externo, cartões responsivos/acessíveis, troca imediata de idioma e rota única pela sidebar, Configurações e Sobre |
| `test_external_link_lifecycle.py` | classificação interna/externa de pop-ups, profile compartilhado, entrega única ao navegador e cleanup no fechamento/shutdown |
Expand Down
37 changes: 37 additions & 0 deletions tests/test_download_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,43 @@ def test_block_permission_denies_every_later_request(self, ask):
self.assertFalse(DownloadManager._authorize_repeated_download(None))
ask.assert_not_called()

@patch(
"zapzap.features.downloads.ui.multiple_download_dialog."
"MultipleDownloadDialog.ask"
)
def test_block_decision_refuses_once_without_saving_a_permanent_block(
self, ask
):
ask.return_value = MultipleDownloadDecision.BLOCK

self.assertTrue(DownloadManager._authorize_repeated_download(None))
self.assertFalse(DownloadManager._authorize_repeated_download(None))
self.assertEqual(
DownloadSettings().multiple_download_permission,
MultipleDownloadPermission.ASK,
)

ask.return_value = MultipleDownloadDecision.ALLOW_ONCE
self.assertTrue(DownloadManager._authorize_repeated_download(None))
self.assertEqual(ask.call_count, 2)

@patch(
"zapzap.features.downloads.ui.multiple_download_dialog."
"MultipleDownloadDialog.ask"
)
def test_always_allow_decision_is_still_remembered(self, ask):
ask.return_value = MultipleDownloadDecision.ALWAYS_ALLOW

self.assertTrue(DownloadManager._authorize_repeated_download(None))
self.assertTrue(DownloadManager._authorize_repeated_download(None))
self.assertEqual(
DownloadSettings().multiple_download_permission,
MultipleDownloadPermission.ALLOW,
)

self.assertTrue(DownloadManager._authorize_repeated_download(None))
self.assertEqual(ask.call_count, 1)


class DownloadNamingSecurityTests(unittest.TestCase):

Expand Down
4 changes: 3 additions & 1 deletion zapzap/features/downloads/download_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ def _authorize_repeated_download(parent) -> bool:
if decision == MultipleDownloadDecision.ALLOW_ONCE:
return True

settings.multiple_download_permission = MultipleDownloadPermission.BLOCK
# Block, Esc and closing the dialog only refuse this request. A
# permanent block was silently saved by an accidental dismissal and
# left every later download blocked with no dialog to undo it.
return False

@staticmethod
Expand Down