Skip to content
This repository was archived by the owner on Sep 22, 2019. It is now read-only.

Commit fff8bf5

Browse files
committed
Don't accept all SP requests when allow_unsigned_verification_requests is true
We should still check whether the SP is allowed to verify the attributes it asks for, even though the SP's identity is not established.
1 parent 2adea73 commit fff8bf5

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'war'
22
apply plugin: 'org.akhikhl.gretty'
33
apply plugin: 'eclipse-wtp'
44

5-
version = "1.1.0"
5+
version = "1.1.1"
66

77
import org.gradle.internal.os.OperatingSystem;
88

src/main/java/org/irmacard/api/web/ApiConfiguration.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,7 @@ public boolean isIssuingEnabled() {
9393
}
9494

9595
public boolean canVerifyAttribute(String sp, AttributeIdentifier attribute) {
96-
/* If allow_unsigned_verification_requests is true, then the service provider's
97-
* name might be unknown (see VerificationResource#newSession()), so it makes
98-
* no sense to insist here that it is present in the list of authorized verifiers. */
99-
if (allow_unsigned_verification_requests)
100-
return true;
101-
102-
if (!authorized_sps.containsKey(sp))
96+
if (!allow_unsigned_verification_requests && !authorized_sps.containsKey(sp))
10397
return false;
10498

10599
ArrayList<String> attributes = authorized_sps.get(sp);

0 commit comments

Comments
 (0)