NewAgreementScreen: Fix URL scheme check
If someone uses http or https urls for the agreement, it would not work as it would have checked http and https but not one or the other. Change-Id: Ifb63e94a4d81297554f52d0b314cb1273b6c2b79
This commit is contained in:
@@ -219,7 +219,7 @@ public class NewAgreementScreen extends AccountScreen {
|
||||
if (url != null && url.length() > 0) {
|
||||
agreementGroup.setVisible(true);
|
||||
agreementHtml.setText(Gerrit.C.rpcStatusWorking());
|
||||
if (!url.startsWith("http:") && !url.startsWith("https:")) {
|
||||
if (!url.startsWith("http:") || !url.startsWith("https:")) {
|
||||
url = GWT.getHostPageBaseURL() + url;
|
||||
}
|
||||
final RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, url);
|
||||
|
||||
Reference in New Issue
Block a user