test_windows_explorer_context_menu_privilege_escalation

Abierto
#2,249 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
22/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python
Área
testing

Línea de trabajo

The failure is in _test_as_non_admin_with_context_menu_path in tests/TestExternalCommand.py, which asserts via assertNotExists in tests/common.py after the elevated shred runs. Reproduce on Windows as a non-admin user with the UAC prompt declined, then trace why the target file survives. Done means this test and tests.TestCLI.CLITestCase.test_gui_exit behave the same way whether the UAC prompt is accepted, declined, or times out.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

When Windows user is not admin, the tests tests.TestCLI.CLITestCase.test_gui_exit and tests.TestExternalCommand launch a UAC prompt, If developer doesn't do anything, they fail with timeout. If developer answers no, then most pass except this one. If developer answers yes, this test passes.

\vcpkg_installed\x86-windows\tools\python3\python.exe -m unittest tests.TestCLI.CLITestCase.test_gui_exit tests.TestExternalCommand
======================================================================
FAIL: test_windows_explorer_context_menu_privilege_escalation (tests.TestExternalCommand.ExternalCommandTestCase.test_windows_explorer_context_menu_privilege_escalation)
Test shredding a file with the context menu command with privilege escalation
----------------------------------------------------------------------
Traceback (most recent call last):
  File "\bleachbit\tests\TestExternalCommand.py", line 410, in test_windows_explorer_context_menu_privilege_escalation
    self._test_as_non_admin_with_context_menu_path(fn_prefix)
  File "\bleachbit\tests\TestExternalCommand.py", line 488, in _test_as_non_admin_with_context_menu_path
    self.assertNotExists(file_to_shred)
  File "\bleachbit\tests\common.py", line 357, in assertNotExists
    raise AssertionError(
AssertionError: The file C:\...\AppData\Local\Temp\ExternalCommandTestCasex93boprt\shred_target_no_spacesqzuw7wok should not exist, but it does.

----------------------------------------------------------------------

commit c8dc496956bf153f385042de8d429bdc7425c32f on master
Microsoft Windows [Version 10.0.26220.8925] [Windows 11 Insider Beta Preview]
Python 3.12 32-bit (vcpkg)

Lenguaje dominante
Python
Estrellas
7.1k
Forks
458
Merge medio
2 d 11 h
PR fusionados (30 d)
40

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de bleachbit/bleachbit

Todos los issues de bleachbit/bleachbit

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.