chore(mod_alworkshops): cast hidden_id to int for consistency #10
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/alworkshops-hidden-id-sqli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Correction — this is hardening, not a security fix
An earlier analysis flagged
hidden_idas a SQL-injection vector via lines 207/239. A follow-up control-flow review (and this PR's own review) found that to be a false positive. Keeping the record straight:$app['user_id'] = $_POST['hidden_id']) lives in the event/webinar branch (theifat 106, taken only whenusr+emailare set). There the tainted value reaches onlyinsert()(193), andMySqlHelper::insert()escapes every value withmysqli_real_escape_string(helper line 177).else if(206, taken only whenusr+emailare not set). On that path line 190 never ran, so$app['user_id']still holds the(int)-cast value from the array init at line 89 — not tainted.So there is no exploitable injection through
hidden_id.What remains
The one-line change stands on its own merit as consistency / defense-in-depth, not as a vulnerability fix:
user_idis numeric and is already(int)-cast everywhere else in this same file (e.g. line 89). The cast is transparent for legitimate input and keeps the field's type consistent should the value ever flow somewhere unescaped after a future refactor.Harmless to merge, harmless to close — no live vulnerability rides on it. Flagging the rationale correction explicitly so the change is not misread as patching a real SQLi.
fix(mod_alworkshops): cast hidden_id to int to close SQL injectionto chore(mod_alworkshops): cast hidden_id to int for consistencyPull request closed