Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #74 from pascal-zarrad/develop
Browse files Browse the repository at this point in the history
Release GCaptchaValidator with new GSon version
  • Loading branch information
pascal-zarrad committed Apr 22, 2022
2 parents c3a98db + 326f419 commit ba9a907
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
15 changes: 9 additions & 6 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| 2.0.x | :white_check_mark:|
| 2.1.x | :ballot_box_with_check: |
| 1.x.x | :x: |
| Version | Supported |
| ------- | ----------------------- |
| 3.0.x | :white_check_mark: |
| 2.1.x | :ballot_box_with_check: |
| 2.0.x | :x: |
| 1.x.x | :x: |

Legend: :white_check_mark: supported - :ballot_box_with_check: support on critical issues - :x: no longer supported

## Reporting a Vulnerability

If you find a security issue, we advise you to _not_ create an issue on GitHub for it, as
it could put all GCaptchaValidator installations on risk.
Please send an e-mail to [security@pascal-zarrad.de](mailto:security@pascal-zarrad.de) to report such issues.
Please send an e-mail to [this email][security-mail] to report such issues.

We take security issues serious and will not create an GitHub issue for any critical security issue
until we have supplied a fix. All communication with the contributor of the issue will be held through e-mail
until we are at a point where we can release information about the issue publicly.

[security-mail]: mailto:p.zarrad@outlook.de
4 changes: 2 additions & 2 deletions pom.xml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<groupId>com.github.playerforcehd</groupId>
<artifactId>gcaptchavalidator</artifactId>
<version>3.0.1</version>
<version>3.0.2</version>
<packaging>jar</packaging>

<name>GCaptchaValidator</name>
Expand Down Expand Up @@ -76,7 +76,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
<version>2.8.9</version>
<scope>compile</scope>
</dependency>
<!-- TestNG -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public void testBasicValidateWithIPIntegration() {

@Test
public void testBasicValidateWithIPWithErrorIntegration() {
CaptchaValidator captchaValidator = new GCaptchaValidator("SomeDefinitlyInvalidSecret!");
CaptchaValidator captchaValidator = new GCaptchaValidator("SomeDefinitelyInvalidSecret!");

boolean result = captchaValidator.basicValidate(
"SomeData",
Expand All @@ -310,7 +310,7 @@ public void testBasicValidateWithoutIPIntegration() {

@Test
public void testBasicValidateWithoutIPWithErrorIntegration() {
CaptchaValidator captchaValidator = new GCaptchaValidator("SomeDefinitlyInvalidSecret!");
CaptchaValidator captchaValidator = new GCaptchaValidator("SomeDefinitelyInvalidSecret!");

boolean result = captchaValidator.basicValidate("SomeData");
assertFalse(result);
Expand All @@ -334,15 +334,14 @@ public void testValidateWithIPIntegration() {

@Test
public void testValidateWithIPWithErrorIntegration() {
CaptchaValidator captchaValidator = new GCaptchaValidator("SomeDefinitlyInvalidSecret!");
CaptchaValidator captchaValidator = new GCaptchaValidator("SomeDefinitelyInvalidSecret!");

CaptchaValidationResponse captchaValidationResponse = captchaValidator.validate(
"SomeData",
"127.0.0.1"
);
assertFalse(captchaValidationResponse.hasSucceeded());
ValidationError[] expectedError = new ValidationError[]{
ValidationError.INVALID_INPUT_RESPONSE,
ValidationError.INVALID_INPUT_SECRET
};
assertEquals(captchaValidationResponse.getErrors(), expectedError);
Expand All @@ -363,12 +362,11 @@ public void testValidateWithoutIPIntegration() {

@Test
public void testValidateWithoutIPWithErrorIntegration() {
CaptchaValidator captchaValidator = new GCaptchaValidator("SomeDefinitlyInvalidSecret!");
CaptchaValidator captchaValidator = new GCaptchaValidator("SomeDefinitelyInvalidSecret!");

CaptchaValidationResponse captchaValidationResponse = captchaValidator.validate("SomeData");
assertFalse(captchaValidationResponse.hasSucceeded());
ValidationError[] expectedError = new ValidationError[]{
ValidationError.INVALID_INPUT_RESPONSE,
ValidationError.INVALID_INPUT_SECRET
};
assertEquals(captchaValidationResponse.getErrors(), expectedError);
Expand Down

0 comments on commit ba9a907

Please sign in to comment.