Fossil SCM

Only honor the fpsilent flag if the user has g.perm.Debug, to avoid that malicious parties inject that flag via the browser dev tools.

stephan 2023-04-19 00:44 forum-skip-notification
Commit b8ab407f782d251c1f84495d0b0491a99323b1f13530dce2e1927c817ff9f7df
1 file changed +1 -1
+1 -1
--- src/forum.c
+++ src/forum.c
@@ -955,11 +955,11 @@
955955
** Return a flags value for use with the final argument to
956956
** forum_post(), extracted from the CGI environment.
957957
*/
958958
static int forum_post_flags(void){
959959
int iPostFlags = 0;
960
- if( P("fpsilent")!=0 ){
960
+ if( g.perm.Debug && P("fpsilent")!=0 ){
961961
iPostFlags |= FPOST_NO_ALERT;
962962
}
963963
return iPostFlags;
964964
}
965965
966966
--- src/forum.c
+++ src/forum.c
@@ -955,11 +955,11 @@
955 ** Return a flags value for use with the final argument to
956 ** forum_post(), extracted from the CGI environment.
957 */
958 static int forum_post_flags(void){
959 int iPostFlags = 0;
960 if( P("fpsilent")!=0 ){
961 iPostFlags |= FPOST_NO_ALERT;
962 }
963 return iPostFlags;
964 }
965
966
--- src/forum.c
+++ src/forum.c
@@ -955,11 +955,11 @@
955 ** Return a flags value for use with the final argument to
956 ** forum_post(), extracted from the CGI environment.
957 */
958 static int forum_post_flags(void){
959 int iPostFlags = 0;
960 if( g.perm.Debug && P("fpsilent")!=0 ){
961 iPostFlags |= FPOST_NO_ALERT;
962 }
963 return iPostFlags;
964 }
965
966

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button