-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
safe-mode + (outdir != sourcedir) == jail violation #262
Comments
I think this is more of a core issue. The jail mechanism has never really been fully fleshed out. It was more of a paranoid mode than a truly useful one. This is a good example. I've long wanted to rework it so it behaves more logically. |
I possibly agree, though don't know how to reproduce it with core standalone. I guess you have permissions to transfer issue to core.
I came across this bug because it turned out that |
There's a weird history around it. Basically, it had to be that way for Asciidoctor to work on GitHub, even though GitHub doesn't actually use any features that are affected by it. |
To reproduce on core, you can use includes with sources under the source tree or output tree, etc. |
Please, see my repro repository.
It has a single
book/book.adoc
:And I try to convert that book to a different directory:
But suddenly, this produces warnings:
And as a result,
book/cool-diag.png
is created instead ofoutput/cool-diag.png
.Expected: no warnings +
cool-diag.png
is created inoutput
directory instead ofbook
directory.Reproduced using asciidoctor-2.0.10 + asciidoctor-diagram 2.0.1.
So, seems like jail mechanism did here the reverse of what it was supposed to do. Instead of allowing to write only into destination dir, it rejected writing to destination dir and forced writing into source dir.
The text was updated successfully, but these errors were encountered: