Skip to content

Conversation

@vipulgupta2048
Copy link
Member

The PR enables the use of an image URL in the config.js of the test suite for it to be later used to download a BalenaOS image.

  • minor: Add Download from URL feature
  • Modify Client to accept URLs for image property

@vipulgupta2048 vipulgupta2048 marked this pull request as draft February 22, 2024 17:38
function isUrl(filePath) {
let pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
'(\\S+\\:\\S+@)?' + // optional user:pass authentication
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name

Check failure

Code scanning / CodeQL

Inefficient regular expression

This part of the regular expression may cause exponential backtracking on strings starting with '0' and containing many repetitions of '0'.
function isUrl(filePath) {
let pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
'(\\S+\\:\\S+@)?' + // optional user:pass authentication
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name

Check failure

Code scanning / CodeQL

Inefficient regular expression

This part of the regular expression may cause exponential backtracking on strings starting with '0' and containing many repetitions of '0'.
function isUrl(filePath) {
let pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
'(\\S+\\:\\S+@)?' + // optional user:pass authentication
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name

Check failure

Code scanning / CodeQL

Inefficient regular expression

This part of the regular expression may cause exponential backtracking on strings starting with '0' and containing many repetitions of '0'.
@vipulgupta2048 vipulgupta2048 force-pushed the vipulgupta2048/download-url branch from 90dbe45 to 3f5ff3a Compare February 22, 2024 17:44
@vipulgupta2048 vipulgupta2048 force-pushed the vipulgupta2048/download-url branch from 3f5ff3a to 999db4d Compare February 22, 2024 17:45
Signed-off-by: Vipul Gupta (@vipulgupta2048) <[email protected]>
@vipulgupta2048 vipulgupta2048 force-pushed the vipulgupta2048/download-url branch from 999db4d to 5d3fc08 Compare February 22, 2024 17:59
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.

2 participants