com web/people: Attempt at fixing karma links for users, such as Rasmus, who got access to the entire Git and SVN source trees: include/karma.php
| From: | Kalle Sommer Nielsen | Date: | Sat, 19 Nov 2016 23:29:42 +0000 |
| Subject: | com web/people: Attempt at fixing karma links for users, such as Rasmus, who got access to the entire Git and SVN source trees: include/karma.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-25342@lists.php.net to get a copy of this message | ||
Commit: d97681f72dfb013e3c66252cf105cbd7944d523e
Author: Kalle Sommer Nielsen <kalle@php.net> Sun, 20 Nov 2016 00:29:42 +0100
Parents: 907e0134fd205944e395a8f05e0f56afa1484dee
Branches: master
Link: http://git.php.net/?p=web/people.git;a=commitdiff;h=d97681f72dfb013e3c66252cf105cbd7944d523e
Log:
Attempt at fixing karma links for users, such as Rasmus, who got access to the entire Git and SVN
source trees
Changed paths:
M include/karma.php
Diff:
diff --git a/include/karma.php b/include/karma.php
index 5e6d8e4..63bf290 100644
--- a/include/karma.php
+++ b/include/karma.php
@@ -1,4 +1,4 @@
-<?php
+<?php
function findKarma($username)
{
@@ -140,6 +140,12 @@ function formatKarmaLinks($line)
}
// SVN
} else {
+ // PHP Group members, such as Rasmus, got access to everything. This
+ // check prevents broken links to /viewvc/*
+ if ($path === '*') {
+ return '<strong>This user have karma for everything!</strong>';
+ }
+
$url = "https://svn.php.net/viewvc/".strtr($path,
array("/*/" => "/trunk/"));
}