368
369
370
371
372
373
374
375
376
377
378
379
380
381
|
if( !g.perm.Read ){ login_needed(); return; }
zName = PD("name", "tip/index.wiki");
for(i=0; zName[i] && zName[i]!='/'; i++){}
if( zName[i]==0 || i>UUID_SIZE ){
zName = "index.html";
goto doc_not_found;
}
memcpy(zBaseline, zName, i);
zBaseline[i] = 0;
zName += i;
while( zName[0]=='/' ){ zName++; }
if( !file_is_simple_pathname(zName) ){
int n = strlen(zName);
if( n>0 && zName[n-1]=='/' ){
|
>
|
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
|
if( !g.perm.Read ){ login_needed(); return; }
zName = PD("name", "tip/index.wiki");
for(i=0; zName[i] && zName[i]!='/'; i++){}
if( zName[i]==0 || i>UUID_SIZE ){
zName = "index.html";
goto doc_not_found;
}
g.zPath = mprintf("%s/%s", g.zPath, zName);
memcpy(zBaseline, zName, i);
zBaseline[i] = 0;
zName += i;
while( zName[0]=='/' ){ zName++; }
if( !file_is_simple_pathname(zName) ){
int n = strlen(zName);
if( n>0 && zName[n-1]=='/' ){
|