]> mop.ddnsfree.com - git repositories - brisk.git/commit
php8: "string + string" fatal in index_wr.php
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 13 Sep 2026 10:31:35 +0000 (12:31 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 13 Sep 2026 10:31:45 +0000 (12:31 +0200)
commitc2554bc99a3cce55f56667300754d2f149215c6f
tree1937b7b9a64b90e3e43fa1badc2e7566102ced9f
parentbcf862a9ace8a91a0022f3cf7daf97fc53d41850
php8: "string + string" fatal in index_wr.php

    echo "Get User Error:" + $argz[0];

A concatenation written in javascript style, with "+" instead of the php ".".
On php 5 and 7 it evaluated to 0+0 with a warning and printed "0"; since
php 8 adding two non numeric strings is a TypeError, and with no catch
anywhere the brisk-spush daemon died on the spot.

The branch is trivial to reach: a request to index_wr.php with an
unrecognised session is enough, an expired cookie for instance. Found by
sending a getchallenge after a daemon restart.

All similar cases were looked for: this is the only one in php code, the
other "+" between strings are inside javascript embedded in the html, or in
shell scripts quoted in comments.

Found by playing a real game in the container: five authenticated users,
table 4, the auction, 40 cards played, score saved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014M1jiEq9cHdE5SE5j6vFuE
web/index_wr.php