Catch bad commentlink patterns and report them
We now refuse to start the server if a commentlink.match is so badly malformed that the java.util.regex package can't parse the expression. This should catch common errors caused by mismatched braces or parens in the expression. Clients now trap expression parse exceptions and try to filter out the invalid patterns. Any exceptions are reported back to the server in the server's error_log, so the site administrator can take action and correct their server's configuration file. In the mean time the patterns are removed from evaulation in the client, so the site is at least still somewhat useful. Bug: issue 389 Change-Id: I7df945acc42f74ba48a9e167fecdb20f102522c8 Signed-off-by: Shawn O. Pearce <sop@google.com> Reviewed-by: Nico Sallembien <nsallembien@google.com>
This commit is contained in:
@@ -20,6 +20,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.AllowCrossSiteRequest;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
import com.google.gwtjsonrpc.client.RpcImpl;
|
||||
import com.google.gwtjsonrpc.client.VoidResult;
|
||||
import com.google.gwtjsonrpc.client.RpcImpl.Version;
|
||||
|
||||
import java.util.List;
|
||||
@@ -31,4 +32,6 @@ public interface SystemInfoService extends RemoteJsonService {
|
||||
|
||||
@SignInRequired
|
||||
void contributorAgreements(AsyncCallback<List<ContributorAgreement>> callback);
|
||||
|
||||
void clientError(String message, AsyncCallback<VoidResult> callback);
|
||||
}
|
||||
|
Reference in New Issue
Block a user