Fossil SCM

Fix a wildly hypothetical JS null deref. Defensive printf format tweak in calculating /style.css/X.

stephan 2026-06-06 08:03 UTC attach-v2
Commit f87586ee73b31e2619b9e1a835496128b75e53f700640435c5d59c6d7d04361b
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -109,11 +109,11 @@
109109
/* Main /forum list. Remove the 'x' form element when eStatus
110110
** changes, to avoid propagating x when changing the filter. */
111111
const pForm = eStatus.parentElement?.parentElement;
112112
if( pForm ){
113113
eStatus.addEventListener('change', ()=>{
114
- pForm.querySelector('input[type="hidden"][name="x"]')?.remove();
114
+ pForm.querySelector('input[type="hidden"][name="x"]')?.remove?.();
115115
}, true);
116116
}
117117
}else{
118118
/* One of the single-post edit/view pages. Handle various UI
119119
controls and attempt to keep stray double-clicks from
120120
--- 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 @@
435435
** path information and include the page-specific CSS along with the
436436
** default CSS when it delivers the page.
437437
*/
438438
zBuiltin = mprintf("style.%s.css", zPage);
439439
if( builtin_file(zBuiltin,0)!=0 ){
440
- blob_appendf(&url, "/%s", zPage);
440
+ blob_appendf(&url, "/%t", zPage);
441441
}
442442
fossil_free(zBuiltin);
443443
444444
/* Add query parameters that will change whenever the skin changes
445445
** or after any updates to the CSS files
446446
--- 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

Keyboard Shortcuts

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