You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Project designer Gantt: build the image URL without document.write() string concatenation #543
This is the same pattern as #542: a PHP value concatenated into a single-quoted JavaScript string that is passed to document.write(), with no escaping for either context.
It is not exploitable today: $project_id is a global that modules/projectdesigner/index.php casts with (int) (L48–49). But the safety depends on a cast in another file, and anyone adding a parameter here will copy the unsafe pattern.
Proposed fix
Use the same helper as the fix for #542: build the query with http_build_query(), output a plain <img>, and set its src from JS with the server part passed through json_encode() (with the JSON_HEX_* flags) and the width appended in JS. All three gantt views (projects, tasks, project designer) can share one helper.
Testing
Project designer → Gantt renders at about 90% of the window width, before and after.
The generated image URL is unchanged apart from encoding.
Activity