mmarkdown / mmark

Mmark: a powerful markdown processor in Go geared towards the IETF
https://mmark.miek.nl
Other
480 stars 45 forks source link

Add 'safeInclude' flag/options #17

Closed miekg closed 6 years ago

miekg commented 6 years ago

Add a 'safeInclude' flag that only allows relative includes and no .. in the paths. This is a simple check.

A more advanced safe include would be to only allow files below the initial file being work on.

miekg commented 6 years ago

This is been done, only files below the current one are allowed, unless -unsafe is given (mparser.UnsafeInclude)