Skip to content
Snippets Groups Projects
Select Git revision
  • 833e48259e23aea76f3765d28d1b2200332301f7
  • passt default
  • master
  • pu
  • todo
  • next
  • maint
  • v2.8.0-rc1
  • v2.8.0-rc0
  • v2.7.2
  • v2.7.1
  • v2.7.0
  • v2.6.5
  • v2.7.0-rc3
  • v2.7.0-rc2
  • v2.7.0-rc1
  • v2.7.0-rc0
  • v2.6.4
  • v2.6.3
  • v2.6.2
  • v2.6.1
  • v2.3.10
  • v2.5.4
  • v2.4.10
  • v2.6.0
  • v2.6.0-rc3
  • v2.5.3
27 results

gitweb

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Jeff King authored and Junio C Hamano committed
    As of CGI.pm's 4.08 release, the behavior to call
    CGI::param() in a list context is deprecated (because it can
    be potentially unsafe if called inside a hash constructor).
    This causes gitweb to issue a warning for some of our code,
    which in turn causes the tests to fail.
    
    Our use is in fact _not_ one of the dangerous cases, as we
    are intentionally using a list context. The recommended
    route by 4.08 is to use the new CGI::multi_param() call to
    make it explicit that we know what we are doing.
    However, that function is only available in 4.08, which is
    about a month old; we cannot rely on having it.
    
    One option would be to set $CGI::LIST_CONTEXT_WARN globally,
    which turns off the warning. However, that would eliminate
    the protection these newer releases are trying to provide.
    We want to annotate each site as OK using the new function.
    
    So instead, let's check whether CGI provides the
    multi_param() function, and if not, provide an
    implementation that just wraps param(). That will work on
    both old and new versions of CGI. Sadly, we cannot just
    check defined(\&CGI::multi_param), because CGI uses the
    autoload feature, which claims that all functions are
    defined. Instead, we just do a version check.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    13dbf46a
    History
    Name Last commit Last update
    ..