Changeset 136619


Ignore:
Timestamp:
May 23, 2015, 2:20:06 PM (4 years ago)
Author:
raimue@…
Message:

base: reject variant names with invalid characters

https://lists.macosforge.org/pipermail/macports-dev/2015-May/030581.html

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r135851 r136619  
    600600    ditem_key $ditem name "[join [ditem_key $ditem provides] -]"
    601601
     602    if {![regexp {^[A-Za-z0-9_]+$} [ditem_key $ditem provides]]} {
     603        set name [ditem_key $ditem provides]
     604        ditem_delete $ditem
     605        return -code error "Variant name $name contains invalid characters"
     606    }
     607
    602608    # make a user procedure named variant-blah-blah
    603609    # we will call this procedure during variant-run
Note: See TracChangeset for help on using the changeset viewer.