You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2024/10/07 22:50:26 UTC

(comdev-people) branch main updated: ensure URL is HTTP[S}

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/comdev-people.git


The following commit(s) were added to refs/heads/main by this push:
     new e32fdd5  ensure URL is HTTP[S}
e32fdd5 is described below

commit e32fdd591073cbfba0ac08cfa97b55eb148d8899
Author: Sebb <se...@apache.org>
AuthorDate: Mon Oct 7 23:50:18 2024 +0100

    ensure URL is HTTP[S}
---
 tools/committers.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/committers.py b/tools/committers.py
index adcdf37..0b7b83d 100755
--- a/tools/committers.py
+++ b/tools/committers.py
@@ -286,7 +286,8 @@ if isfile(HTACCESS):
             person = ldap_people[id]
             if 'urls' in person:
                 for url in person['urls']:
-                    if not re.search(SELF_RE, url, re.IGNORECASE):
+                    # Must be an http[s] URL and must not be self reference
+                    if re.match(r"^https?://", url) and not re.search(SELF_RE, url, re.IGNORECASE):
                         hta.write(f"RedirectMatch ^/~{id}(/.*)?$ {url}$1\n")
                         break