Ignore:
Timestamp:
Jun 2, 2007, 2:26:58 PM (11 years ago)
Author:
jberry@…
Message:

Add support for decoding of obscured maintainer addresses.

We support two types of obscured addresses in Portfile maintainers field:

(1) username ==> implies username@…
(2) subdomain.tld:username ==> implies username@…

These are unobscured by port info, and by port submit during the submission process,
but are left obscured in the Portfile to avoid accidental disclosure.

File:
1 edited

Legend:

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

    r25586 r25795  
    10061006}
    10071007
     1008
     1009# unobscure maintainer addresses as used in Portfiles
     1010# We allow two obscured forms:
     1011#       (1) User name only with no domain:
     1012#                       foo implies foo@macports.org
     1013#       (2) Mangled name:
     1014#                       subdomain.tld:username implies username@subdomain.tld
     1015#
     1016proc unobscure_maintainers { list } {
     1017        set result {}
     1018        foreach m $list {
     1019                if {[string first "@" $m] < 0} {
     1020                        if {[string first ":" $m] >= 0} {
     1021                                set m [regsub -- "(.*):(.*)" $m "\\2@\\1"]
     1022                        } else {
     1023                                set m "$m@macports.org"
     1024                        }
     1025                }
     1026                lappend result $m
     1027        }
     1028        return $result
     1029}
     1030
     1031
     1032
     1033
    10081034########### Internal Dependency Manipulation Procedures ###########
    10091035
Note: See TracChangeset for help on using the changeset viewer.