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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kars7e
Copy link

@kars7e kars7e commented Jun 24, 2017

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.
Copy link
Member

@rsandell rsandell left a comment

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
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
2 participants