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

variable substitution in url field #7

Closed
shahzebsiddiqui opened this issue Feb 10, 2020 · 1 comment
Closed

variable substitution in url field #7

shahzebsiddiqui opened this issue Feb 10, 2020 · 1 comment
Labels
question Further information is requested

Comments

@shahzebsiddiqui
Copy link
Contributor

Hello,

We have a PR in progress in easybuild see easybuilders/easybuild#591 One of the issues we have is URL-checker can't accept variable substitution. We have configuration files (.eb) that build the http url based on few parameters that include version to fetch the tarball for compilation.

Is it possible to fix this issue or is only workaround to ignore these using white list. Can we white list by extension instead of by each filename.

@SuperKogito
Copy link
Member

I am not sure what do you mean by variable substitution. I get that you automatically generate your links but what do you mean by "URL-checker can't accept variable substitution"?. In case you have an idea for a feature, I suggest you open a new issue for a feature request with a clear description of what do you need? and what does it do? with some examples preferably, so I can understand the use case and be able to implement it. You are also welcome to contribute if you already have an idea how to implement it.

As for your second question concerning a workaround, yes, you can white list using an extension, a pattern or even a key-phrase/ word, using the white_listed_patterns variable. Currently the code checks if a pattern is in the link and if so it is white listed.

# check white listed patterns
i = 0
while i < len(white_listed_patterns):
  if white_listed_patterns[i] in url:
      return True
  i += 1

The pattern can be a phrase, a base link or a key-word (which can be an extension).

@SuperKogito SuperKogito added the question Further information is requested label Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants