<input type="text" id="chat-input" style="font-size: 1.2em;visibility:collapse;" placeholder="type here.."/>
<div id="chat-output"></div>
</td>
- <!--
- <td style="background: white;">
- <input type="file" id="file">
- <div id="file-progress"></div>
- </td>
- -->
</tr>
</tbody>
</table>
<input type="text" id="chat-input" style="font-size: 1.2em;visibility:collapse;" placeholder="type here.."/>
<div id="chat-output"></div>
</td>
- <!--
- <td style="background: white;">
- <input type="file" id="file">
- <div id="file-progress"></div>
- </td>
- -->
</tr>
</tbody>
</table>
function(response) {
console.log(response.data);
$scope.showChart = true;
- document.getElementById('chartiframe').contentWindow.document.write(response.data);
- document.getElementById('chartiframe').contentWindow.document.close();
+ var chartiframe = document.getElementById('chartiframe');
+ chartiframe.contentWindow.document.write(response.data);
+ chartiframe.contentWindow.document.close();
});
} else {
$scope.showChart = false;
// "/context/single_signon.htm"
final String redirectUrl = request.getContextPath() + singleSignonPrefix
+ "redirectToPortal=Yes&" + forwardUrlParm;
- validateDomain(redirectUrl);
logger.debug(EELFLoggerDelegate.debugLogger, "preHandle: session is expired, redirecting to {}",
redirectUrl);
response.sendRedirect(redirectUrl);
// Redirect to an absolute path in the webapp; e.g.,
// "/context/single_signon.htm"
final String redirectUrl = request.getContextPath() + singleSignonPrefix + forwardUrlParm;
- validateDomain(redirectUrl);
logger.debug(EELFLoggerDelegate.debugLogger, "preHandle: took exception {}, redirecting to {}",
ex.getMessage(), redirectUrl);
response.sendRedirect(redirectUrl);
return super.preHandle(request, response, handler);
}
- private void validateDomain(final String redirectUrl) throws MalformedURLException {
+ public void validateDomain(final String redirectUrl) throws MalformedURLException {
if (StringUtils.isNotBlank(redirectUrl)) {
String hostName = new URL(redirectUrl).getHost();
if (StringUtils.isNotBlank(hostName)
import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
import org.onap.portalsdk.core.restful.domain.EcompRole;
import org.onap.portalsdk.core.restful.domain.EcompUser;
+import org.owasp.esapi.ESAPI;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
}
} else {
String msg = "doPost: no match for request " + requestUri;
- logger.warn(msg);
+ logger.warn( ESAPI.encoder().encodeForHTML(msg));
responseJson = buildJsonResponse(false, msg);
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}
} catch (Exception ex) {
- logger.error("doPost: Failed to process request " + requestUri, ex);
+ logger.error("doPost: Failed to process request " + ESAPI.encoder().encodeForHTML(requestUri), ex);
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
responseJson = buildJsonResponse(ex);
}
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.owasp.esapi.ESAPI;
public class SSOUtil {
try {
encodedAppURL = URLEncoder.encode(appURL, "UTF-8");
} catch (UnsupportedEncodingException ex) {
- logger.error("getECOMPSSORedirectURL: Failed to encode app URL " + appURL, ex);
+ logger.error("getECOMPSSORedirectURL: Failed to encode app URL " + ESAPI.encoder().encodeForHTML(appURL), ex);
}
String portalURL = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
if (portalURL == null || portalURL.length() == 0) {
response.setCharacterEncoding("UTF-8");
request.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();
- out.write("An error occurred while removing Role in the toggleRole()");
+ out.write("An error occurred while saving the CronJob : saveCronJob()");
}
}