-
Bug
-
Resolution: Fixed
-
Low
-
8.7.0
-
2
-
Severity 3 - Minor
-
3
-
Issue Summary
This is reproducible on Data Center: (yes) / (no)
Steps to Reproduce
- Set a repo to allow public access
- Go to the repo without logging in and click on the Compare button

- A 500 error page is returned

Expected Results
Error should not be encountered.
Actual Results
The below exception is thrown in the xxxxxxx.log file:
2023-01-23 04:03:59,308 ERROR [http-nio-7990-exec-22] o.a.c.c.C.[.[.[/].[default] Servlet.service() for servlet [default] in context with path [] threw exception [Request processing failed; nested exception is com.googl
e.template.soy.tofu.SoyTofuException: When evaluating "to_json($ij.principal)": While computing function "to_json($ij.principal)": Cannot invoke "java.lang.CharSequence.toString()" because "sequence" is null] with root c
ause
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.toString()" because "sequence" is null
at com.google.common.base.CharMatcher.replaceFrom(CharMatcher.java:721)
at com.atlassian.stash.internal.web.soy.functions.ToJsonFunction.safeJson(ToJsonFunction.java:56)
at com.atlassian.stash.internal.web.soy.functions.ToJsonFunction.apply(ToJsonFunction.java:51)
at com.atlassian.stash.internal.web.soy.functions.ToJsonFunction.apply(ToJsonFunction.java:14)
at com.atlassian.soy.impl.modules.SoyJavaFunctionAdapter.computeForJava(SoyJavaFunctionAdapter.java:34)
at com.atlassian.soy.impl.modules.CompositeFunctionAdaptor.computeForJava(CompositeFunctionAdaptor.java:38)
at com.google.template.soy.sharedpasses.render.EvalVisitor.computeFunctionHelper(EvalVisitor.java:670)
at com.google.template.soy.sharedpasses.render.EvalVisitor.visitFunctionNode(EvalVisitor.java:653)
at com.google.template.soy.sharedpasses.render.EvalVisitor.visitFunctionNode(EvalVisitor.java:87)
at com.google.template.soy.exprtree.AbstractReturningExprNodeVisitor.visit(AbstractReturningExprNodeVisitor.java:118)
at com.google.template.soy.sharedpasses.render.EvalVisitor.visitExprRootNode(EvalVisitor.java:148)
at com.google.template.soy.sharedpasses.render.EvalVisitor.visitExprRootNode(EvalVisitor.java:87)
at com.google.template.soy.exprtree.AbstractReturningExprNodeVisitor.visit(AbstractReturningExprNodeVisitor.java:81)
at com.google.template.soy.exprtree.AbstractReturningExprNodeVisitor.visit(AbstractReturningExprNodeVisitor.java:73)
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available