Am Montag, 4. Februar 2019, 16:32:38 CET schrieb John Ralls:
> >>> Thanks for the pointer. I've copied this script into our git at
> >>> 
> >>>  ./util/obfuscate.pl
> >> 
> >> While for most gnc-fq-* scripts we us
> >> #!@-PERL-@
> >> and adjust them while building.
> >> 
> >> In utils all perl scripts are hardcoded to
> >> #! /usr/bin/perl
> >> Wouldn't it make sense to have them also configurable?
> 
> No, because gnc-fq-* are build products and util/*.pl are build tools. Since
> obfuscate.pl isn't a build tool it doesn't belong in util; if we're going
> to distribute it for users (and if we're not why put it in the repo at
> all?) then it needs to go somewhere Cmake can find it and install it to
> $CMAKE_INSTALL_PREFIX/bin or libexec and it needs to be renamed to
> "gnc-xml-obfuscate".

Sure. Since it's code and I wanted to edit it, I wanted to put it somewhere in 
git. If there is a better place for it, please anyone feel free to move it 
there.

> > How about going:
> > 
> > #! /usr/bin/env perl
> 
> That's widely regarded as a security hole, though it's also widely used.
> Since it's trivial to override the shebang by calling the perl of your
> choice and passing the script as $1 it's kind of pointless.
> 
> While we're on the topic of shebangs remember that they don't work on
> Windows. Remember too that running this obfuscate script on Windows will
> require the user to install perl. They might already have done so for
> Finance::Quote, but lots of users don't use F::Q.

The script won't work on Windows anyway, at least not out of the box, because 
it not only needs a Perl installation including XML::DOM, but also some word 
list. On Linux this is available under /usr/share/dict/words (symlink to the 
default language's word list), but for windows some other choice has to be 
written into the obfuscate.pl script. Currently this isn't the case, so it 
will just complain about the missing word list.

Regards,
Christian



_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to