Fossil SCM

Add a notification that online file editing is enabled to the security audit.

drh 2020-05-28 12:05 trunk
Commit a80861de031923411c79b1e037207bacc8afa2e9b7ce63fce8db0cf5a53ad625
+1 -1
--- src/fileedit.c
+++ src/fileedit.c
@@ -888,11 +888,11 @@
888888
889889
/*
890890
** If the fileedit-glob setting has a value, this returns its Glob
891891
** object (in memory owned by this function), else it returns NULL.
892892
*/
893
-static Glob * fileedit_glob(void){
893
+Glob *fileedit_glob(void){
894894
static Glob * pGlobs = 0;
895895
static int once = 0;
896896
if(0==pGlobs && once==0){
897897
char * zGlobs = db_get("fileedit-glob",0);
898898
once = 1;
899899
--- src/fileedit.c
+++ src/fileedit.c
@@ -888,11 +888,11 @@
888
889 /*
890 ** If the fileedit-glob setting has a value, this returns its Glob
891 ** object (in memory owned by this function), else it returns NULL.
892 */
893 static Glob * fileedit_glob(void){
894 static Glob * pGlobs = 0;
895 static int once = 0;
896 if(0==pGlobs && once==0){
897 char * zGlobs = db_get("fileedit-glob",0);
898 once = 1;
899
--- src/fileedit.c
+++ src/fileedit.c
@@ -888,11 +888,11 @@
888
889 /*
890 ** If the fileedit-glob setting has a value, this returns its Glob
891 ** object (in memory owned by this function), else it returns NULL.
892 */
893 Glob *fileedit_glob(void){
894 static Glob * pGlobs = 0;
895 static int once = 0;
896 if(0==pGlobs && once==0){
897 char * zGlobs = db_get("fileedit-glob",0);
898 once = 1;
899
--- src/security_audit.c
+++ src/security_audit.c
@@ -521,10 +521,17 @@
521521
nCgi = nFile==0 ? 0 : db_int(0,"SELECT count(*) FROM sfile WHERE isexe");
522522
@ <li><p> CGI Extensions are enabled with a document root
523523
@ at <a href='%R/extfilelist'>%h(g.zExtRoot)</a> holding
524524
@ %d(nCgi) CGIs and %d(nFile-nCgi) static content and data files.
525525
}
526
+
527
+ if( fileedit_glob()!=0 ){
528
+ @ <li><p><a href='%R/fileedit'>Online File Editing</a> is enabled
529
+ @ for this repository. Clear the
530
+ @ <a href='%R/setup_settings'>"fileedit-glob" setting</a> to
531
+ @ disable online editing.</p>
532
+ }
526533
527534
@ <li><p> User capability summary:
528535
capability_summary();
529536
530537
531538
--- src/security_audit.c
+++ src/security_audit.c
@@ -521,10 +521,17 @@
521 nCgi = nFile==0 ? 0 : db_int(0,"SELECT count(*) FROM sfile WHERE isexe");
522 @ <li><p> CGI Extensions are enabled with a document root
523 @ at <a href='%R/extfilelist'>%h(g.zExtRoot)</a> holding
524 @ %d(nCgi) CGIs and %d(nFile-nCgi) static content and data files.
525 }
 
 
 
 
 
 
 
526
527 @ <li><p> User capability summary:
528 capability_summary();
529
530
531
--- src/security_audit.c
+++ src/security_audit.c
@@ -521,10 +521,17 @@
521 nCgi = nFile==0 ? 0 : db_int(0,"SELECT count(*) FROM sfile WHERE isexe");
522 @ <li><p> CGI Extensions are enabled with a document root
523 @ at <a href='%R/extfilelist'>%h(g.zExtRoot)</a> holding
524 @ %d(nCgi) CGIs and %d(nFile-nCgi) static content and data files.
525 }
526
527 if( fileedit_glob()!=0 ){
528 @ <li><p><a href='%R/fileedit'>Online File Editing</a> is enabled
529 @ for this repository. Clear the
530 @ <a href='%R/setup_settings'>"fileedit-glob" setting</a> to
531 @ disable online editing.</p>
532 }
533
534 @ <li><p> User capability summary:
535 capability_summary();
536
537
538

Keyboard Shortcuts

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