Fossil

Check-in [02e7c86b]
Login

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

Overview
Comment:Change a case of isalnum() to fossil_isalnum().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 02e7c86b3f40df7cf4dec259daadd939fcd95aff4bd937ea08dedc3383bd6efc
User & Date: drh 2020-05-21 23:59:14.243
Context
2020-05-22
00:27
Add CSS rules to limit the width of input and textarea items to 95% of the available screen width. ... (check-in: dbcfcef7 user: drh tags: trunk)
2020-05-21
23:59
Change a case of isalnum() to fossil_isalnum(). ... (check-in: 02e7c86b user: drh tags: trunk)
23:56
Add a Content-Disposition: header to the HTTP reply for the "Download" button. ... (check-in: 34cb4766 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/cgi.c.
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
                 /*  0123456789 123456789 123456789 123456789 123456*/
  char *z = mprintf("Content-Disposition: attachment; filename=\"%s\";\r\n",
                    zFilename);
  int i;
  int n = (int)strlen(z);
  for(i=43; i<n-4; i++){
    char c = z[i];
    if( isalnum(c) ) continue;
    if( c=='.' || c=='-' || c=='/' ) continue;
    z[i] = '_';
  }
  cgi_append_header(z);
  fossil_free(z);
}








|







443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
                 /*  0123456789 123456789 123456789 123456789 123456*/
  char *z = mprintf("Content-Disposition: attachment; filename=\"%s\";\r\n",
                    zFilename);
  int i;
  int n = (int)strlen(z);
  for(i=43; i<n-4; i++){
    char c = z[i];
    if( fossil_isalnum(c) ) continue;
    if( c=='.' || c=='-' || c=='/' ) continue;
    z[i] = '_';
  }
  cgi_append_header(z);
  fossil_free(z);
}