latex3 / latex2e

The LaTeX2e kernel
https://www.latex-project.org/
LaTeX Project Public License v1.3c
1.88k stars 261 forks source link

eliminating ".tex" file special case in kpathsea #1412

Open kberry opened 2 months ago

kberry commented 2 months ago

(Since no one answered my July 1 mail to latex-team, I'll try here.)

Due to LaTeX's ".tex" file, there has always been a special case in kpathsea to allow writing a file named ".tex" (no other dot files are allowed). I'd like to eliminate the special case (for TL25), since nefarious people could in theory use it and most users probably wouldn't think twice about it. It's not technically more of a security issue than being able to write anything, but still, it would be nice to get rid of it for safety and simplicity.

Right now I gather .tex is created in the current directory by tools.ins: \generate{\file{.tex}{\from{fileerr.dtx}{return}}}. If I change kpathsea, that write will fail.

The simplest way I can think of to handle this is to have the dtx write to a temp file, say tmpdot.tex, and then move it to .tex outside of TeX, as part of making the distribution. If there's some other way to handle it, then great.

wdyt? --thanks, karl.

davidcarlisle commented 2 months ago

sorry the email dropped through the cracks.

Another possibility would be not to generate .tex at all but simply have it included in the source distribution.

kberry commented 2 months ago
Another possibility would be not to generate `.tex` at all but simply
have it included in the source distribution.

Sure, that sounds simplest of all. I just didn't know if you'd up for having a non-dtx-generated file :). --thanks, karl.

FrankMittelbach commented 2 months ago

Sure, that sounds simplest of all. I just didn't know if you'd up for having a non-dtx-generated file :). --thanks, karl.

CTAN will tell us off for it --- a code file without source ---, but we can refer them to you then :-)

more seriously it probably needs a bit juggling with the set up, but it should be doable, and no it didn't fell through the cracks, at least not here, only I didn't want to address it before Prague, especially not as somebody wants slides in time and I had originally planned for a mindmap talk (my bad I should have realized beforehand that this would become a requirement)

github-actions[bot] commented 13 hours ago

This issue has been automatically marked as stale because it has not had recent activity.

kberry commented 9 minutes ago

Let me just make sure: if I take out the special case allowing ".tex" from kpathsea for the TL25 binaries, you'll adjust latex as needed? Thanks.

davidcarlisle commented 3 minutes ago

@kberry I think that's the plan although we haven't changed anything yet