From: Simon McVittie Date: Sat, 24 Dec 2016 15:03:51 +0000 (+0000) Subject: Force CGI::FormBuilder->field to scalar context where necessary X-Git-Tag: debian/3.20120629.2+deb7u2~35 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/93c590e9e8ae2d9ba1705937d11632f8f7e3a786?ds=sidebyside;hp=93c590e9e8ae2d9ba1705937d11632f8f7e3a786 Force CGI::FormBuilder->field to scalar context where necessary CGI::FormBuilder->field has behaviour similar to the CGI.pm misfeature we avoided in f4ec7b0. Force it into scalar context where it is used in an argument list. This prevents two (relatively minor) commit metadata forgery vulnerabilities: * In the comments plugin, an attacker who was able to post a comment could give it a user-specified author and author-URL even if the wiki configuration did not allow for that, by crafting multiple values to other fields. * In the editpage plugin, an attacker who was able to edit a page could potentially forge commit authorship by crafting multiple values for the rcsinfo field. The remaining plugins changed in this commit appear to have been protected by use of explicit scalar prototypes for the called functions, but have been changed anyway to make them more obviously correct. In particular, checkpassword() in passwordauth has a known prototype, so an attacker cannot trick it into treating multiple values of the name field as being the username, password and field to check for. OVE-20161226-0001 (cherry picked from commit c1120bbbe8fdea20cf64fa12247f4f4a4006c834) ---