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

Validate function changes working directory but does not restore it #2

Open
bvitale opened this issue Jun 24, 2020 · 0 comments · May be fixed by #4
Open

Validate function changes working directory but does not restore it #2

bvitale opened this issue Jun 24, 2020 · 0 comments · May be fixed by #4

Comments

@bvitale
Copy link

bvitale commented Jun 24, 2020

I have an app using samlify and this module for the XML validator.

The following chdir call creates problems for my app since my app code subsequently reads other files from disk (example, Express view templates). After samlify processes a request, it no longer can find those. They're using relative paths, so I can probably make those absolute with __dirname for instance. But should this be restoring the previous working directory after validation?
https://github.com/authenio/samlify-validate-with-xmllint/blob/master/index.ts#L8

Thanks!

mastermatt added a commit to mastermatt/samlify-validate-with-xmllint that referenced this issue Jan 6, 2023
Pass the absolute path of the XSD to `xmllint` instead of changing the cwd of the entire Node process.
Also updated .npmignore to include the index.d.ts and not double include the schamas in the pack.

Fixes authenio#2, fixes authenio#3
@mastermatt mastermatt linked a pull request Jan 6, 2023 that will close this issue
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 a pull request may close this issue.

1 participant