You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2015/09/18 13:25:26 UTC
svn commit: r1703811 - in /openmeetings:
branches/3.0.x/src/web/java/org/apache/openmeetings/web/pages/auth/SignInPage.java
trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInPage.java
Author: solomax
Date: Fri Sep 18 11:25:26 2015
New Revision: 1703811
URL: http://svn.apache.org/viewvc?rev=1703811&view=rev
Log:
[OPENMEETINGS-1254] crash on OAuth2 server creation is fixed
Modified:
openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/pages/auth/SignInPage.java
openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInPage.java
Modified: openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/pages/auth/SignInPage.java
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/pages/auth/SignInPage.java?rev=1703811&r1=1703810&r2=1703811&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/pages/auth/SignInPage.java (original)
+++ openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/pages/auth/SignInPage.java Fri Sep 18 11:25:26 2015
@@ -184,12 +184,14 @@ public class SignInPage extends BaseInit
public static String getRedirectUri(OAuthServer server, Component component) {
String result = "";
- try {
- String base = getBean(ConfigurationDao.class).getBaseUrl();
- URI uri = new URI(base + component.urlFor(SignInPage.class, new PageParameters().add("oauthid", server.getId())));
- result = uri.normalize().toString();
- } catch (URISyntaxException e) {
- log.error("Unexpected error while getting redirect URL", e);
+ if (server.getId() != null) {
+ try {
+ String base = getBean(ConfigurationDao.class).getBaseUrl();
+ URI uri = new URI(base + component.urlFor(SignInPage.class, new PageParameters().add("oauthid", server.getId())));
+ result = uri.normalize().toString();
+ } catch (URISyntaxException e) {
+ log.error("Unexpected error while getting redirect URL", e);
+ }
}
return result;
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInPage.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInPage.java?rev=1703811&r1=1703810&r2=1703811&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInPage.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInPage.java Fri Sep 18 11:25:26 2015
@@ -184,12 +184,14 @@ public class SignInPage extends BaseInit
public static String getRedirectUri(OAuthServer server, Component component) {
String result = "";
- try {
- String base = getBean(ConfigurationDao.class).getBaseUrl();
- URI uri = new URI(base + component.urlFor(SignInPage.class, new PageParameters().add("oauthid", server.getId())));
- result = uri.normalize().toString();
- } catch (URISyntaxException e) {
- log.error("Unexpected error while getting redirect URL", e);
+ if (server.getId() != null) {
+ try {
+ String base = getBean(ConfigurationDao.class).getBaseUrl();
+ URI uri = new URI(base + component.urlFor(SignInPage.class, new PageParameters().add("oauthid", server.getId())));
+ result = uri.normalize().toString();
+ } catch (URISyntaxException e) {
+ log.error("Unexpected error while getting redirect URL", e);
+ }
}
return result;
}