diff --git a/.gitattributes b/.gitattributes
index 79b352482..55f46e516 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,3 @@
src/test/resources/com/vonage/client/test/keys/application_key binary
-src/test/resources/com/vonage/client/test/keys/application_key2 binary
\ No newline at end of file
+src/test/resources/com/vonage/client/test/keys/application_key2 binary
+*.sh linguist-vendored
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3958c5eca..f6e404851 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
+# [8.15.1] - 2024-12-19
+- Removed hardcoded domain validation from `VoiceClient.downloadRecordingRaw`
+
# [8.15.0] - 2024-12-03
- Added proxy support to `HttpConfig.Builder`
- Basic auth in header instead of query params in SMS API
diff --git a/pom.xml b/pom.xml
index 838a54c3d..f60432595 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.vonage
server-sdk
- 8.15.0
+ 8.15.1
Vonage Java Server SDK
Java client for Vonage APIs
@@ -86,7 +86,7 @@
org.junit.jupiter
junit-jupiter-engine
- 5.11.3
+ 5.11.4
test
@@ -228,7 +228,7 @@
maven-javadoc-plugin
- 3.11.1
+ 3.11.2
true
diff --git a/src/main/java/com/vonage/client/HttpWrapper.java b/src/main/java/com/vonage/client/HttpWrapper.java
index a1e7faadf..91f71cd3f 100644
--- a/src/main/java/com/vonage/client/HttpWrapper.java
+++ b/src/main/java/com/vonage/client/HttpWrapper.java
@@ -37,7 +37,7 @@
public class HttpWrapper {
private static final String
CLIENT_NAME = "vonage-java-sdk",
- CLIENT_VERSION = "8.15.0",
+ CLIENT_VERSION = "8.15.1",
JAVA_VERSION = System.getProperty("java.version"),
USER_AGENT = String.format("%s/%s java/%s", CLIENT_NAME, CLIENT_VERSION, JAVA_VERSION);
diff --git a/src/main/java/com/vonage/client/voice/VoiceClient.java b/src/main/java/com/vonage/client/voice/VoiceClient.java
index 09acedce0..6d4b6f48e 100644
--- a/src/main/java/com/vonage/client/voice/VoiceClient.java
+++ b/src/main/java/com/vonage/client/voice/VoiceClient.java
@@ -532,12 +532,7 @@ public void removeDtmfListener(String uuid) throws VoiceResponseException {
* @since 7.11.0
*/
public byte[] downloadRecordingRaw(String recordingUrl) {
- if (validateUrl(recordingUrl).contains(".nexmo.com/v1/files")) {
- return downloadRecording.execute(recordingUrl);
- }
- else {
- throw new IllegalArgumentException("Invalid recording URL");
- }
+ return downloadRecording.execute(validateUrl(recordingUrl));
}
/**
diff --git a/src/test/java/com/vonage/client/voice/VoiceClientTest.java b/src/test/java/com/vonage/client/voice/VoiceClientTest.java
index e46d30f2e..cf36cbb72 100644
--- a/src/test/java/com/vonage/client/voice/VoiceClientTest.java
+++ b/src/test/java/com/vonage/client/voice/VoiceClientTest.java
@@ -408,7 +408,7 @@ public void testDownloadRecording() throws Exception {
String recordingId = UUID.randomUUID().toString();
String content = "";
stubResponse(200, content);
- String url = "https://api.nexmo.com/v1/files/" + recordingId;
+ String url = "https://api-eu.vonage.com/v1/files/" + recordingId;
Path temp = Files.createTempFile(null, null);
Files.delete(temp);
@@ -421,24 +421,12 @@ public void testDownloadRecording() throws Exception {
assertTrue(Files.exists(recordingPath));
assertArrayEquals(content.getBytes(), Files.readAllBytes(recordingPath));
- stubResponseAndAssertThrows(content, () ->
- client.saveRecording("ftp:///myserver.co.uk/rec.mp3", recordingPath),
- IllegalArgumentException.class
- );
- stubResponseAndAssertThrows(content, () ->
- client.saveRecording("http://example.org/recording.wav", recordingPath),
- IllegalArgumentException.class
- );
- stubResponseAndAssertThrows(content, () ->
- client.saveRecording("https://example.org/recording.wav", recordingPath),
- IllegalArgumentException.class
- );
stubResponseAndAssertThrows(content, () ->
client.saveRecording(url, null),
NullPointerException.class
);
stubResponseAndAssertThrows(content, () ->
- client.saveRecording("not-a-url", recordingPath),
+ client.saveRecording(";not_a urlĀ£", recordingPath),
IllegalArgumentException.class
);
}