Fossil

Check-in [ded8615f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change the "dir" webpage to require read permission.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ded8615f952666328b656e506fe4eedb516cd21f
User & Date: drh 2012-07-20 14:54:45
References
2012-07-20
15:19
/json/dir now requires Read ("o"), instead of Hyperlink ("h") permission, analog to checkin [ded8615f95]. check-in: 625ed004 user: stephan tags: trunk
Context
2012-07-20
15:06
Replaced $(x) with gebi(x), as per ML discussion. check-in: dfce20e4 user: stephan tags: trunk
14:54
Change the "dir" webpage to require read permission. check-in: ded8615f user: drh tags: trunk
2012-07-19
22:03
Fix a formatting problem on the setup_settings page. check-in: 6f594af6 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/browse.c.

118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
  int rid = 0;
  char *zUuid = 0;
  Blob dirname;
  Manifest *pM = 0;
  const char *zSubdirLink;

  login_check_credentials();
  if( !g.perm.Hyperlink ){ login_needed(); return; }
  while( nD>1 && zD[nD-2]=='/' ){ zD[(--nD)-1] = 0; }
  style_header("File List");
  sqlite3_create_function(g.db, "pathelement", 2, SQLITE_UTF8, 0,
                          pathelementFunc, 0, 0);

  /* If the name= parameter is an empty string, make it a NULL pointer */
  if( zD && strlen(zD)==0 ){ zD = 0; }







|







118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
  int rid = 0;
  char *zUuid = 0;
  Blob dirname;
  Manifest *pM = 0;
  const char *zSubdirLink;

  login_check_credentials();
  if( !g.perm.Read ){ login_needed(); return; }
  while( nD>1 && zD[nD-2]=='/' ){ zD[(--nD)-1] = 0; }
  style_header("File List");
  sqlite3_create_function(g.db, "pathelement", 2, SQLITE_UTF8, 0,
                          pathelementFunc, 0, 0);

  /* If the name= parameter is an empty string, make it a NULL pointer */
  if( zD && strlen(zD)==0 ){ zD = 0; }