You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tex4ebook with the option -B "epub-build" I got an error saying "attempt to index a nil value".
The root cause is in tex4ebook-exec_epub.lua, in the function remove_builddir, where a call is made to string.gsub with unsanitised user input:
returnfilename:gsub("^" ..builddir.."/", "")
In this particular case, the cause is that "-" is a special character for lua patterns, so the pattern "^epub-build/" does not match for strings which start with "epub-build/". I will try to submit a pull request with a suggested fix soon.
The text was updated successfully, but these errors were encountered:
Danie-1
added a commit
to Danie-1/tex4ebook
that referenced
this issue
Jun 16, 2024
When running
tex4ebook
with the option-B "epub-build"
I got an error saying "attempt to index a nil value".The root cause is in
tex4ebook-exec_epub.lua
, in the functionremove_builddir
, where a call is made tostring.gsub
with unsanitised user input:In this particular case, the cause is that "-" is a special character for lua patterns, so the pattern "^epub-build/" does not match for strings which start with "epub-build/". I will try to submit a pull request with a suggested fix soon.
The text was updated successfully, but these errors were encountered: