mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 08:55:58 +03:00
[PR #145] [MERGED] Fix code scanning alert no. 4: Uncontrolled data used in path expression #576
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#576
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/145
Author: @AJaySi
Created: 1/9/2025
Status: ✅ Merged
Merged: 1/13/2025
Merged by: @AJaySi
Base:
main← Head:alert-autofix-4📝 Commits (1)
f97a223Fix code scanning alert no. 4: Uncontrolled data used in path expression📊 Changes
1 file changed (+10 additions, -2 deletions)
View changed files
📝
lib/ai_seo_tools/image_alt_text_generator.py(+10 -2)📄 Description
Fixes https://github.com/AJaySi/AI-Writer/security/code-scanning/4
To fix the problem, we need to ensure that the
image_pathprovided by the user is validated and sanitized before being used in file operations. We can achieve this by normalizing the path and ensuring it is within a specific directory. This will prevent path traversal attacks and restrict file access to a safe directory.os.path.normpath.Suggested fixes powered by Copilot Autofix. Review carefully before merging.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.