Skip to content

[JENKINS-32898] Fix Disable Strict Forbidden File Verification option#318

Open
kars7e wants to merge 1 commit into
jenkinsci:masterfrom
kars7e:fix-forbidden-path
Open

[JENKINS-32898] Fix Disable Strict Forbidden File Verification option#318
kars7e wants to merge 1 commit into
jenkinsci:masterfrom
kars7e:fix-forbidden-path

Conversation

@kars7e

@kars7e kars7e commented Jun 24, 2017

Copy link
Copy Markdown

When Strict Forbidden File Verification option is disabled, job can
still be triggered if file paths are mixed, i.e. there are some files
that match forbidden file paths, and some that only match included file
paths. However, when ALL files match forbidden file paths, job should
not be triggered.

This patch ensures this by checking whether all files match forbidden
file paths if Strict Forbidden File Verification Option is disabled.


This change is Reviewable

When Strict Forbidden File Verification option is disabled, job can
still be triggered if file paths are mixed, i.e. there are some files
that match forbidden file paths, and some that only match included file
paths. However, when ALL files match forbidden file paths, job should
not be triggered.

This patch ensures this by checking whether all files match forbidden
file paths if Strict Forbidden File Verification Option is disabled.
@kars7e kars7e force-pushed the fix-forbidden-path branch from eb27d02 to 5976fc8 Compare June 26, 2017 03:46

@rsandell rsandell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs tests

if (foundInterestingForbidden) {
// we have a forbidden file and a wanted file path.
} else {
for (FilePath ffp : forbiddenFilePaths) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably needs a null check as you've done in isForbiddenFile

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