Skip to content
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

BUG: EscapePerlString too eager #514

Closed
wants to merge 0 commits into from
Closed

Conversation

schumar
Copy link

@schumar schumar commented Oct 2, 2023

EscapePerlString in utility.c,
introduced in 14c9aaf and expanded in 5a6e32a, escapes

  • single-quotes (correct)
  • backslashes (NOT correct)
  • semi-colons (NOT correct)

If a module-files has

setenv foo bar\\zak\;gar

it will correctly set the env-var foo to bar\zak;gar in e.g. bash, but will result in bar\\zak\;gar in Perl:

$ modulecmd perl load $module
[...] $ENV{'foo'} = 'bar\\zak\;gar';

(The current branch (since 8e050c4) only escapes single-quotes:

$ modulecmd perl load $module
[...]
$ENV{'foo'} = 'bar\zak;gar';

i.e. does not have this bug.)

@xdelaruelle
Copy link
Member

Thanks for the contribution. Despite the message on this github issue, I have accepted this code proposal. I just changed it a bit to adapt the non-regression test suite.

For the record: issue is marked "closed" rather "merged" as I messed up with the remote branch. But everything is correctly merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants