mirror of
https://github.com/User0332/rewards-farmer.git
synced 2026-09-16 01:31:36 +00:00
reject profile names that resolve outside data-dir
The character check allowed "." and "..", which are made entirely of allowed characters and still walk out of the directory, so the traversal guard only stopped the cases containing a separator. Reject both by name and check the resolved path against the profile root as well, since the character set constrains the characters rather than where they point. Also drop the MouseUtils and KeyboardUtils built in run_account and never used, RewardsTaskUtils builds its own, along with the two imports that leaves unused, and say "lowercased" in the no-source warning, which is what the code returns.
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ def search_query_for_task(task_description: str) -> str:
|
||||
|
||||
# Every feed was unreachable. The description still contains the topic,
|
||||
# so a trimmed version beats skipping the card entirely.
|
||||
logger.warning("No query source reachable, using the task description as written.")
|
||||
logger.warning("No query source reachable, using the lowercased task description.")
|
||||
|
||||
return task_description.lower()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user