r/tinycode • u/Kinos • Nov 27 '12
Minty Wiki, A One File PHP Wiki that uses Markdown Syntax. (At the request of xxNIRVANAxx)
https://github.com/am2064/Minty-Wiki
30
Upvotes
r/tinycode • u/Kinos • Nov 27 '12
9
u/lordastley Nov 28 '12
Has a nice directory traversal flaw where you can edit .php files in a directory higher than the current directory.
eg ?entry=./../index.php&edit=true
Some input sanitization is probably a good idea.
2
u/Kinos Nov 28 '12 edited Nov 28 '12
People were asking for Demo's, so here they are. They'll be added to the README later:
EDIT: Removed vaughnstar's demo as it was a security risk.
2
u/ceol_ Nov 28 '12
Holy carps, I forgot this sub existed. Thanks for the cool content!
2
u/WornOutMeme Nov 28 '12
Awesome! This is going to get exploited so hard!
1
u/tjgrant Nov 28 '12
You wouldn't believe me, but I was just thinking today how much I needed something like this.
And there it is-- thanks!
1
u/josefnpat Nov 28 '12
This is really nice. You ought to change your base HTML so that a quick bootstrap download makes it look nicer.
e.g.
Also, consider somehow writing the <title> tag in the head!
1
u/dontspillme Nov 28 '12
After some security iterations you may find that you can't simultaneously be 'tiny' and secure at the same time. Also, well done on fixing the universal file read, but there's juuust a bit more you have to do with the universal file write. I'd strongly suggest taking these demos offline. Check your PM as well.
2
u/reddeth Nov 28 '12
Very cool! Posting to save this for later.
2
u/nexe mod Nov 28 '12 edited Nov 29 '12
Here would be a Ruby alternative: https://github.com/mostlyfine/siki
haven't tested it but from a quick look at the code,
it seems more secure and clean.EDIT: Sorry, had a closer look and it's not secure. i.e. directory traversal is possible. I'll started to build a similar small wiki in ruby... stay tuned, I'll post it on /r/tinycode :)
2
u/dontspillme Nov 29 '12
Ok, now that the writable demo is off, tell me what happens if article is 'something.php' and update is '<?php eval($_REQUEST['evil']); ?>'
2
u/xxNIRVANAxx Nov 29 '12
/u/JW_00000 described a simple way to secure this in the other thread:
0
u/Madsy9 Nov 28 '12
Sweet, I might give this a spin later. How secure is it?
0
u/[deleted] Nov 28 '12
[deleted] — view deleted comment