You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes users send something they really should not in their rageshake descriptions. I propose here an approach to reject rageshakes whose description matches a regex. The rejection reason is reflected client-side so the user's client can show them want went wrong.
The sample config file provides a regex to reject user texts that could contain a recovery key.
Co-authored-by: Richard van der Hoff <[email protected]>
Copy file name to clipboardExpand all lines: docs/blocked_rageshake.md
+2
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ The rageshake server you attempted to upload a report to is not accepting ragesh
14
14
Generally, the developers who run a rageshake server will only be able to handle reports for applications they are developing,
15
15
and your application is not listed as one of those applications.
16
16
17
+
The rageshake server could also be rejecting the text you wrote in your bug report because its content matches a rejection rule. This usually happens to prevent you from disclosing private information in the bug report itself.
18
+
17
19
Please contact the distributor of your application or the administrator of the web site you visit to report this as a problem.
http.Error(w, "This server does not accept rageshakes from your application. See https://github.com/matrix-org/rageshake/blob/master/docs/blocked_rageshake.md", 400)
227
227
return
228
228
}
229
-
ifs.cfg.matchesRejectionCondition(p) {
230
-
log.Printf("Blocking rageshake from app %s because it matches a rejection_condition", p.AppName)
229
+
rejection:=s.cfg.matchesRejectionCondition(p)
230
+
ifrejection!=nil {
231
+
log.Printf("Blocking rageshake from app %s because it matches a rejection_condition: %s", p.AppName, *rejection)
231
232
iferr:=os.RemoveAll(reportDir); err!=nil {
232
233
log.Printf("Unable to remove report dir %s after rejected upload: %v\n",
233
234
reportDir, err)
234
235
}
235
-
http.Error(w, "This server does not accept rageshakes from your application + version. See https://github.com/matrix-org/rageshake/blob/master/docs/blocked_rageshake.md", 400)
236
+
userErrorText:=fmt.Sprintf("This server did not accept the rageshake because it matches a rejection condition: %s. See https://github.com/matrix-org/rageshake/blob/master/docs/blocked_rageshake.md", *rejection)
0 commit comments