Skip to content

Commit 6bfb8df

Browse files
authored
Merge pull request #747 from jenkinsci/revert-744-app-org-different-from-repo-org
Revert "Do not enforce GitHub app to comes from the same org as the repo org. The GH app can come from another org as log as it is installed in the org with the target git repo there is no security issue"
2 parents 6b61a1d + 901162c commit 6bfb8df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubAppCredentials.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ public String getUsername() {
326326
@NonNull
327327
public synchronized GitHubAppCredentials withOwner(@NonNull String owner) {
328328
if (this.owner != null) {
329+
if (!owner.equals(this.owner)) {
330+
throw new IllegalArgumentException("Owner mismatch: " + this.owner + " vs. " + owner);
331+
}
329332
return this;
330333
}
331334
if (byOwner == null) {

0 commit comments

Comments
 (0)