Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
1.0.7 (#584)
Browse files Browse the repository at this point in the history
* adjusting log statement (#583)

* adjusting log statement

* code review

* Introduce new version 1.0.7
  • Loading branch information
christian-kirschnick authored Jun 15, 2020
1 parent c225375 commit 9429244
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-Drevision=1.0.6
-Drevision=1.0.7
-Dlicense.projectName=Corona-Warn-App
-Dlicense.inceptionYear=2020
-Dlicense.licenseName=apache_v2
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public boolean verifyTan(String tanString) {

return verifyWithVerificationService(tan);
} catch (IllegalArgumentException e) {
logger.error("TAN Syntax check failed for TAN: {}", tanString.trim());
logger.error("TAN Syntax check failed for TAN: {}, length: {}",
tanString.substring(0, Math.min(36, tanString.length())), tanString.length());
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ void checkInvalidTan() {
assertThat(tanVerificationResponse).isFalse();
}

@Test
void checkTooLongTan() {
server.stubFor(
post(urlEqualTo(verificationPath))
.withHeader(CONTENT_TYPE, equalTo(MediaType.APPLICATION_JSON.toString()))
.willReturn(aResponse().withStatus(HttpStatus.NOT_FOUND.value())));

boolean tanVerificationResponse = tanVerifier.verifyTan(randomUUID + randomUUID);

assertThat(tanVerificationResponse).isFalse();
}

@Test
void checkInternalServerError() {
server.stubFor(
Expand Down

0 comments on commit 9429244

Please sign in to comment.