chiark / gitweb /
make-secnet-sites: Tainted: Fix a lot of bad return values
This code had remnants of a previously intended calling convention,
where object return chaining would be used.
Unfortunately in the currently used calling style, we expect to get a
boolean back everywhere, where true meas `ok'. Returning `self' is
always treated as `ok' because it's trueish.
Luckily this doesn't cause actual security bugs because we always
return from all of the top-level entrypoints via ._rtn[val] which
checks the ._ok setting, which does properly track problems. So we
fail an assertion rather than printing a nice message. This is not
pretty but it is not a vulnerability.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>