Skip to content

Commit 7868b00

Browse files
committed
Merge pull request #1 from charlessimpson/master
Allow AWS GovCloud ARN's to validate
2 parents 505c5dd + a6defda commit 7868b00

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.jenkins-ci.plugins</groupId>
77
<artifactId>plugin</artifactId>
8-
<version>1.409</version>
8+
<version>1.553</version>
99
</parent>
1010

1111
<artifactId>snsnotify</artifactId>

src/main/java/org/jenkinsci/plugins/snsnotify/AmazonSNSNotifier.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,8 @@ private String getSNSApiEndpoint(String topicArn) {
118118
// it seems to be a reasonably safe assumption, and avoids extra
119119
// configuration variables.
120120

121-
if (!topicArn.startsWith("arn:aws:sns:")) {
122-
return null;
123-
}
124-
125121
String[] arnParts = topicArn.split(":");
126-
if (arnParts.length < 5) {
122+
if (arnParts.length < 5 || !arnParts[0].equals("arn") || !arnParts[2].equals("sns")) {
127123
return null;
128124
}
129125

0 commit comments

Comments
 (0)