Fossil SCM
Fix a wildly hypothetical JS null deref. Defensive printf format tweak in calculating /style.css/X.
Commit
f87586ee73b31e2619b9e1a835496128b75e53f700640435c5d59c6d7d04361b
Parent
0c5322dda4fe6ef…
2 files changed
+1
-1
+1
-1
+1
-1
| --- src/fossil.page.forumpost.js | ||
| +++ src/fossil.page.forumpost.js | ||
| @@ -109,11 +109,11 @@ | ||
| 109 | 109 | /* Main /forum list. Remove the 'x' form element when eStatus |
| 110 | 110 | ** changes, to avoid propagating x when changing the filter. */ |
| 111 | 111 | const pForm = eStatus.parentElement?.parentElement; |
| 112 | 112 | if( pForm ){ |
| 113 | 113 | eStatus.addEventListener('change', ()=>{ |
| 114 | - pForm.querySelector('input[type="hidden"][name="x"]')?.remove(); | |
| 114 | + pForm.querySelector('input[type="hidden"][name="x"]')?.remove?.(); | |
| 115 | 115 | }, true); |
| 116 | 116 | } |
| 117 | 117 | }else{ |
| 118 | 118 | /* One of the single-post edit/view pages. Handle various UI |
| 119 | 119 | controls and attempt to keep stray double-clicks from |
| 120 | 120 |
| --- src/fossil.page.forumpost.js | |
| +++ src/fossil.page.forumpost.js | |
| @@ -109,11 +109,11 @@ | |
| 109 | /* Main /forum list. Remove the 'x' form element when eStatus |
| 110 | ** changes, to avoid propagating x when changing the filter. */ |
| 111 | const pForm = eStatus.parentElement?.parentElement; |
| 112 | if( pForm ){ |
| 113 | eStatus.addEventListener('change', ()=>{ |
| 114 | pForm.querySelector('input[type="hidden"][name="x"]')?.remove(); |
| 115 | }, true); |
| 116 | } |
| 117 | }else{ |
| 118 | /* One of the single-post edit/view pages. Handle various UI |
| 119 | controls and attempt to keep stray double-clicks from |
| 120 |
| --- src/fossil.page.forumpost.js | |
| +++ src/fossil.page.forumpost.js | |
| @@ -109,11 +109,11 @@ | |
| 109 | /* Main /forum list. Remove the 'x' form element when eStatus |
| 110 | ** changes, to avoid propagating x when changing the filter. */ |
| 111 | const pForm = eStatus.parentElement?.parentElement; |
| 112 | if( pForm ){ |
| 113 | eStatus.addEventListener('change', ()=>{ |
| 114 | pForm.querySelector('input[type="hidden"][name="x"]')?.remove?.(); |
| 115 | }, true); |
| 116 | } |
| 117 | }else{ |
| 118 | /* One of the single-post edit/view pages. Handle various UI |
| 119 | controls and attempt to keep stray double-clicks from |
| 120 |
+1
-1
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -435,11 +435,11 @@ | ||
| 435 | 435 | ** path information and include the page-specific CSS along with the |
| 436 | 436 | ** default CSS when it delivers the page. |
| 437 | 437 | */ |
| 438 | 438 | zBuiltin = mprintf("style.%s.css", zPage); |
| 439 | 439 | if( builtin_file(zBuiltin,0)!=0 ){ |
| 440 | - blob_appendf(&url, "/%s", zPage); | |
| 440 | + blob_appendf(&url, "/%t", zPage); | |
| 441 | 441 | } |
| 442 | 442 | fossil_free(zBuiltin); |
| 443 | 443 | |
| 444 | 444 | /* Add query parameters that will change whenever the skin changes |
| 445 | 445 | ** or after any updates to the CSS files |
| 446 | 446 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -435,11 +435,11 @@ | |
| 435 | ** path information and include the page-specific CSS along with the |
| 436 | ** default CSS when it delivers the page. |
| 437 | */ |
| 438 | zBuiltin = mprintf("style.%s.css", zPage); |
| 439 | if( builtin_file(zBuiltin,0)!=0 ){ |
| 440 | blob_appendf(&url, "/%s", zPage); |
| 441 | } |
| 442 | fossil_free(zBuiltin); |
| 443 | |
| 444 | /* Add query parameters that will change whenever the skin changes |
| 445 | ** or after any updates to the CSS files |
| 446 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -435,11 +435,11 @@ | |
| 435 | ** path information and include the page-specific CSS along with the |
| 436 | ** default CSS when it delivers the page. |
| 437 | */ |
| 438 | zBuiltin = mprintf("style.%s.css", zPage); |
| 439 | if( builtin_file(zBuiltin,0)!=0 ){ |
| 440 | blob_appendf(&url, "/%t", zPage); |
| 441 | } |
| 442 | fossil_free(zBuiltin); |
| 443 | |
| 444 | /* Add query parameters that will change whenever the skin changes |
| 445 | ** or after any updates to the CSS files |
| 446 |