Feed title shinanigans? #1

Open
opened 2016-09-04 23:48:28 +00:00 by jflory7 · 0 comments
Owner

Originally filed by dxa4481 on GitHub


So on this line
https://github.com/decause/feedcloud/blob/master/gencloud.py#L30

What happens if my feed title is something like

../../../../../../../home/decause/Documents/superSecretTextFile


@decause

Excellent question! Do you have any suggestions for a library that normalizes/validates URLs, or another strategy to protect against such shenanigans?


dxa4481

You can try this guy's solution (top answer, not the poster), it's a little lengthy but I think it works

https://stackoverflow.com/questions/6803505/does-my-code-prevent-directory-traversal


dxa4481

I think you got the same thing going on here. The HFOSS one is a little more serious because now you can access any file, not just .txt files. You might want to test out my hunch, I could be mistaken. Depends how the feed parser handles things

https://github.com/decause/hfoss/blob/master/hfossfeedpull.py#L25


_Originally filed by dxa4481 on [GitHub](https://github.com/decause/feedcloud/issues/1)_ ---- So on this line https://github.com/decause/feedcloud/blob/master/gencloud.py#L30 What happens if my feed title is something like `../../../../../../../home/decause/Documents/superSecretTextFile` ---- @decause Excellent question! Do you have any suggestions for a library that normalizes/validates URLs, or another strategy to protect against such shenanigans? ---- dxa4481 You can try this guy's solution (top answer, not the poster), it's a little lengthy but I think it works https://stackoverflow.com/questions/6803505/does-my-code-prevent-directory-traversal ---- dxa4481 I think you got the same thing going on here. The HFOSS one is a little more serious because now you can access any file, not just .txt files. You might want to test out my hunch, I could be mistaken. Depends how the feed parser handles things https://github.com/decause/hfoss/blob/master/hfossfeedpull.py#L25 ----
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
commops/feedcloud#1
No description provided.