C0deH4cker / PwnableHarness

Manage building and deploying exploitation challenges with ease
MIT License
57 stars 4 forks source link

Any files with spaces in their filenames will break the recursive Build.mk search #13

Closed C0deH4cker closed 4 weeks ago

C0deH4cker commented 2 years ago

This happened a few years ago in SunshineCTF (internal fix commit), so it may be fixed already, but I don't think so. There was a file present with a name like Evil Spaces.pdf. Because of the space in the filename, the $(wildcard ...) call resulted in a broken "array", as arrays in make are space-separated. To avoid attempting to recurse into these broken path names, a simple existence check at the beginning of the recursive call should suffice. This will prevent recursing into directories whose names contain spaces, but at least a single file in the repo with a space in the name won't fully break PwnableHarness.