This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  42171c6390f21f3045bb856ac74bbd21ea81e156 (commit)
      from  d815f40f129bdfc89d3c38a931e750076c158f09 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=42171c6390f21f3045bb856ac74bbd21ea81e156

commit 42171c6390f21f3045bb856ac74bbd21ea81e156
Author: mirabilos <[email protected]>
Date:   Wed Jun 1 10:40:47 2016 +0200

    escape all characters illegal in PostgreSQL identifiers [#816]
    
    • probably only works for ASCII, but we have group names as input
      so that should be no problem
    • $ is special in PostgreSQL but also disallowed by ANSI C
    • we need to stay compatible to previous encodings at all cost
    • NAMEDATALEN is 64, which could be a problem, we should have
      used the numeric ID in the first place, but that’s now not
      doable any more to not break existing installations

diff --git a/src/plugins/mediawiki/www/LocalSettings.php 
b/src/plugins/mediawiki/www/LocalSettings.php
index f860855..2e07bab 100644
--- a/src/plugins/mediawiki/www/LocalSettings.php
+++ b/src/plugins/mediawiki/www/LocalSettings.php
@@ -103,6 +103,9 @@ $wgPasswordSender = forge_get_config('admin_email');
 
 function ff_mw_db_name($s) {
        $s = str_replace('-', '_', $s);
+       $s = preg_replace_callback('/[^A-Za-z0-9_]/', function ($match) {
+               return sprintf('$%02X', ord($match[0]));
+           }, $s);
        return $s;
 }
 

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/mediawiki/www/LocalSettings.php | 3 +++
 1 file changed, 3 insertions(+)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to