News for hackers. Stuff that matters.
Re:Show HN: I made a simple PDF text editor by shashanoid on Saturday May 30, 2020 @09:50PM (#23366533)
Hi, I bootstrapped this simple website. Let me know what you think :)
Re:Show HN: I made a simple PDF text editor by mhasbini on Saturday May 30, 2020 @10:35PM (#23366695)
I tried it with a bit complex pdf structure and it worked like charm +1. Would love to learn more about the underlying techniques/tech.
Re:Show HN: I made a simple PDF text editor by hombre_fatal on Saturday May 30, 2020 @10:59PM (#23366785)
https://github.com/shashanoid/Simpdf/blob/1557bf838a8debeee1...

Btw, arbitrary code execution vuln here, OP.

Re:Show HN: I made a simple PDF text editor by parhamn on Saturday May 30, 2020 @11:12PM (#23366846)
Yeah. Switch array & args disable the shell. I hope they’re not running that locally as the download script suggests. But then you still have a bunch of other security issues. Shrug.
Re:Show HN: I made a simple PDF text editor by miccah on Sunday May 31, 2020 @12:06AM (#23367101)
I'm investigating the same. The upload endpoint uses secure_filename to get the filename used in that func. I'm not familiar with it, but the docs say it could return an empty string.
Re:Show HN: I made a simple PDF text editor by dellinspiron on Saturday May 30, 2020 @10:52PM (#23366751)
It just calls https://github.com/pdf2htmlEX/pdf2htmlEX on the server.
Re:Show HN: I made a simple PDF text editor by chipperyman573 on Sunday May 31, 2020 @01:23AM (#23367403)
You could create a file named ; echo 'hi'; #

and it appears as if it would probably run anything you put between ; and # (in this case it will echo hi). Unless the filename is sanitized, which it appears to not be.

Re:Show HN: I made a simple PDF text editor by echan00 on Saturday May 30, 2020 @11:37PM (#23366971)
What calls what?
Re:Show HN: I made a simple PDF text editor by shashanoid on Sunday May 31, 2020 @12:06AM (#23367099)
Hey, there's nothing complex going on. I'm using a tool to convert pdf to html, and it does a phenomenal job.
Re:Show HN: I made a simple PDF text editor by koulvi on Sunday May 31, 2020 @11:47AM (#23370276)
I used this to delete a few pages from a pdf file. However, I can't download the edited version. The "save and download" option is just resulting in opening another blank webpage.