abrignoni / abrignoni/ALEAPP

File paths with # are treated as a URI delimiter

Offen
#711 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
908
Forks
244
Ø Merge
10 Std. 18 Min.
Gemergte PRs (30 T.)
288

Beschreibung

If the output file path contains a `#` character, the `get_sqlite_db_path` function treats it as a URI delimiter, causing any attempts to open a file fail:

# Error log

```
[2/2] userDict [userDict] artifact started
Error with %5C%5C%3F%5CE:\1 - Programming\# Third Party\ALEAPP\ALEAPP_Reports_2026-06-01_Monday_211557\data\Dump\data\data\com.android.providers.userdictionary\databases\user_dict.db:
- unable to open database file
Reading userDict artifact had errors!
Error was 'NoneType' object has no attribute 'cursor'
Exception Traceback: Traceback (most recent call last):
File "aleapp.py", line 397, in crunch_artifacts
plugin.method(files_found, category_folder, seeker, wrap_text)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\1 - Programming\# Third Party\ALEAPP\scripts\artifacts\userDict.py", line 11, in get_userDict
cursor = db.cursor()
^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'cursor'

Processes completed.
Processing time = 00:00:00
Processing time (wall)= 00:00:00
```

Notice the error on `Error with %5C%5C%3F%5CE:\1 - Programming\# Third Party\ALEAPP\ALEAPP_Reports_2026-06-`

# Remediation

Don't use file paths with a `#`. The reason I do is so they are sorted to the top.

# Permanent fix

I've added a fix by using `urllib.parse.quote` function to safely escape the path characters.

Merge request to follow.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.