Normalize OpenID URLs with http:// prefix
Gerrit used to violate OpenID 1.1 and 2.0, both of which require
OpenIDs to be normalized (http:// added). Gerrit now normalizes
OpenIDs before checking whether they are permitted.
Bug: issue 1019
Change-Id: I5e75e7d5782ec400adaacbe26f602b46f502709b
(cherry picked from commit e9c3992898
)
This commit is contained in:
@@ -347,12 +347,17 @@ public class OpenIdSignInDialog extends SignInDialog implements
|
||||
public void onSubmit(final SubmitEvent event) {
|
||||
event.cancel();
|
||||
|
||||
final String openidIdentifier = providerId.getText();
|
||||
String openidIdentifier = providerId.getText();
|
||||
if (openidIdentifier == null || openidIdentifier.equals("")) {
|
||||
enable(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!openidIdentifier.startsWith("http://")
|
||||
&& !openidIdentifier.startsWith("https://")) {
|
||||
openidIdentifier = "http://" + openidIdentifier;
|
||||
}
|
||||
|
||||
if (!isAllowedProvider(openidIdentifier)) {
|
||||
showError(OpenIdUtil.C.notAllowed());
|
||||
enableRetryDiscovery();
|
||||
|
Reference in New Issue
Block a user