Skip to content

Commit

Permalink
Add null check around user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
WimJongeneel committed Feb 6, 2024
1 parent dce9f57 commit 92de4f9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ protected void processRequest(IMxRuntimeRequest request, IMxRuntimeResponse resp
* a 200 OK tells word the end of the redirect is reached, and it will happily open the
* original URL in your default browser...
*/
if (request.getHeader("User-Agent").toLowerCase().contains("office")) {
String userAgent = request.getHeader("User-Agent");
if (userAgent != null && userAgent.toLowerCase().contains("office")) {
response.setStatus(IMxRuntimeResponse.OK);
return;
}
Expand Down

0 comments on commit 92de4f9

Please sign in to comment.