In-My-Opinion.org

»How to protect your phpBB forum against hackers«







Argh, hackers! Freddy is back

This is a description how to make it harder for an attacker to harm your phpBB discussion board or to gain control over it, should a new security issue be found.

Please also see my other phpBB mods at
and the backup suite at IMO → PhpBB mod (freeware): Backup database and files

My tips will help you to protect your phpBB no matter what future bugs or security issues will be found. And no matter what current security issues exist.

Let's see the history of critical (= very serious) security issues:
phpBB critical update to 2.0.11: My tips would have protected your forum
phpBB critical update to 2.0.13: My tips would have protected your forum
phpBB critical update to 2.0.15: My tips would have protected your forum
phpBB critical update to 2.0.16: My tips would have protected your forum
phpBB critical update to 2.0.17: My tips would have protected your forum
phpBB critical update to 2.0.18: My tips would have protected your forum
phpBB critical update to 2.0.19: My tips would have protected your forum

Unfortunately, the creators of phpBB take the fixing of security issues not serious enough.
• They have no list of all security issues
• If you have modded your forum a lot (= installed/changed/reprogrammed your forum) you have no chance to update it to the newest (= most secure) state. The automatic updates won't work.
• They have no step by step guide how to fix each one of them. For example if your version is 2.0.5 then what do you do to manually update it to fix all security issues fast?
• They have no "security checking programs" which you could run and which would report all open security holes found.
• They have obviously no picture of an ideal scene. Their programming is designed to fix issues that arise instead of starting a "once-for-all-secure" plan. Cobblers.
• They are unpolite: When I mentioned that they either a) treat security issues not seriously OR b) modding not seriously then my topic was locked and I was warned.
• They even refused to fix a security bug (they claimed it was no security issue) that later caused the deletion of whole websites (see below: %2527 bug).


But whatever: This is NOT a description how to fix known bugs in phpBB anyway.

Moreover it's NOT ENOUGH to fix the currently known bugs.
• Especially if you use mods (= third party software for your forum) you are at risk, since these mods may contain security bugs themselves.
• Some exploits are so serious that every minute counts. But take the fixing of 2.0.16 for example: It took phpBB approx. 14 days to fix a serious exploit.


Right now, while I write this, phpbb.com itself is under attack. Their site is unavailable except for the text:
At present phpbb.com is offline due to a group of politically motivated hackers.
...
A third party application looks to have been the problem.
...
Please do not ask us...we simply cannot comment at this time without having further information ourselves. Just as soon as we have a clearer picture, which depending on the condition of our server may be impossible to obtain, we will update the community.
...
We are working to recover the server.
...
The persons who attacked the site deleted all web access logs, all system logs and the root user log. Other critical system folders/files were also deleted


The following tips will prevent 99% of cracks, since most of cracks are done by script kiddies  Baby's got a temper who will not waste a lot of time with a single forum.

Some of the tips also apply to other than phpBB software, so you should read them, even if you don't use phpBB.


posted by knn

in-my-opinion.org -> Technology, Computers, Science, Internet -> Software by the admin -> How to protect your phpBB forum against hackers

Tip 1: Prevent hackers from finding your forum



Often the ones who try to hack your forum don't even know your forum. They found you accidentally with Google. Often hackers look in Google for pages that contain "Powered by phpbb 2.0.3"  or similar to exploit bugs in exactly this version.

Thus change the text "Powered by phpBB" to something else.
You can leave the link to
but please change the wording.

To change the wording simply change: "phpBB" to "php B.B."

You may also consider to use a .gif image that says "Powered by phpBB". I have attached one (see below).

You may also consider to use my "Floating Menu mod" (which you can currently see in the upper left corner, and which has some other advantages). You can download the mod from


To effectively change the wording you need only to change the file "overall_footer.tpl" of your default template.

If you want to hide the version info of your phpBB board then
• Open "includes/page_tail.php"
• Change

'PHPBB_VERSION' =>

to

// 'PHPBB_VERSION' =>




[CLICK HERE TO VIEW THIS PICTURE]


posted by knn
  

Tip 2: Prevent deletion of your forum via the admin panel



THERE ARE BASICALLY ONLY the following .php scripts to mass delete forums/posts/topics. (If you know of more then please reply in this thread).

In other words: If you limit the following methods, then an intruder can hardly harm your forum by mass deletion.
• "admin/admin_db_utilities.php" (-> this backups and restores the database, thus an intruder could use it to "restore" your forum to an empty state , thus effectively delete your whole forum)
• "admin/admin_forums.php" (-> forum management = creating/deleting/renaming forums)
• "modcp.php" (-> deleting/moving/splitting/merging topics)


Thus if an intruder should gain control over 1 of these files (for example by intruding as a "fake admin" or a "fake mod"), then he can do much harm.

Tip A: "admin_db_utilities.php" is probably the most important (= severe) of files and the most unimportant (= useless for everyday's admin's life). Simply delete (or rename) the file "admin/admin_db_utilities.php"
If a attacker should gain control over your administration panel then at least he has no control over your database. If you don't delete the above file, an attacker who logs in as admin can alter ANY data in your database or delete the database completely:
With the 3 words

drop database NameOfYourDatabase 

an attacker can delete the whole database. Not again

You should use other means to backup your database anyway. I have written a phpBB Backup Suite. Check it out at IMO → PhpBB mod (freeware): Backup database and files

Tip B: You can also delete (or rename) the file "admin/admin_forums.php". After you have setup your board (with all the sub forum names and descriptions, you will hardly need that file again). If you need it, then upload it again, change your forum structure and delete it again. Should you leave this file, then an intruder can delete any forum with a single click.

Tip C: Another method how an intruder can delete a bunch of topics at once is with "modcp.php". You can rename this file to something else, which is actually a bad idea, since this file is needed to move/delete/merge/split topics. So the following approach is better:
You can abolish the "Delete topics" function (hell, why do you need to delete a topic anyway?):
• Open "modcp.php"
• Change

$delete = ( isset($HTTP_POST_VARS['delete']) ) ? TRUE FALSE

to

$delete = ( isset($HTTP_POST_VARS['delete']) ) ? FALSEFALSE



Now if you legitimately want to delete a whole topic then you have to delete it post by post. However, from my own experience I know of no case when deleting whole topic would make sense, EXCEPT in the event of an accidentally double post (= someone started a topic and pressed accidentally the "submit" button twice). But in that case such a topic consists of only 1 post, thus deleting it "post by post" causes not much trouble.

Of course, an intruder (= logged in as fake admin or fake mod) could still delete posts manually one after one. But I think that's too tiresome for most of them.


posted by knn
  

Tip 3: Prevent hackers from accessing your Admin Panel



TIP A: Force an ADDITIONAL login to access the admin panel.

I think one of the best ideas is to password-protect your admin folder.

I have written a .php script that will do that for you.
• Upload htaccess-protectthisfolder.zip (see below) into your admin folder and call it.


TIP B: Rename the folder "admin/" to something else. This is ONE OF THE BEST things you can do to keep crackers out.
After doing so you will most probably get an error message the next time you log in. Most probably you will have to
• Open "includes/functions.php"
• Update

include($phpbb_root_path . 'admin/

with your new foldername.
• Open "admin/pagestart.php"
• Find

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])

• Before add:

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
    {
    
redirect(append_sid(
    
basename(dirname($HTTP_SERVER_VARS['PHP_SELF']),"/").'/'.basename($HTTP_SERVER_VARS['PHP_SELF'])
    ));
    }




TIP C: If you want you can trick an attacker even more after you have renamed your admin/ folder (TIP B). Simply create a new "admin/" (= an empty folder) with only 1 ".htaccess" file inside. I have attached such a .htaccess file. It will annoyingly ask the intruder for a username and password. The intuder will think that the admin/ folder is password protected and will give up his attacks and will not search for the real admin folder.

TIP D: Delete the admin link at the bottom of each page: You can do this usually by editing "page_tail.php":
    • Open "includes/page_tail.php"
    • Replace

'ADMIN_LINK' => $admin_link

by

'ADMIN_LINK' => ''


Combined with the renaming of the "admin" folder (Tip B) it's an easy yet very effective measure.


htaccess.zip
1) Rename the admin/ folder to something else
2) Create a folder with the name 'admin/'
3) Upload this .htaccess file into the newly created 'admin/' folder.
Download 278 Bytes

htaccess-protectthisfolder.zip
Password-protect ANY online folder. This php script creates the needed .htaccess and .htpasswd files automatically.
Download 1.61 KB



posted by knn
  

Tip 4:Change the table prefix to prevent SQL injection hacks



Don't use "phpbb_" as table prefix. A lot of crackers assume that you use the default table prefix "phpbb_" for their SQL injection attacks. Think something up that is not obvious. It can be a really crazy prefix, most probably you won't ever need to know it again. Do the following to change your prefix:
    • Change the prefix in "config.php"
            • Open "config.php"
            • Replace

$table_prefix = 'phpbb_'

with your new made up prefix, for example with "xyz14xyz_"
    • Change the prefix in your database by renaming all tables
            • Run this SQL query

ALTER TABLE phpbb_auth_access      RENAME TO xyz14xyz_auth_access;
ALTER TABLE phpbb_banlist          RENAME TO xyz14xyz_banlist;
ALTER TABLE phpbb_categories       RENAME TO xyz14xyz_categories;
ALTER TABLE phpbb_config           RENAME TO xyz14xyz_config;
ALTER TABLE phpbb_confirm          RENAME TO xyz14xyz_confirm;
ALTER TABLE phpbb_disallow         RENAME TO xyz14xyz_disallow;
ALTER TABLE phpbb_forum_prune      RENAME TO xyz14xyz_forum_prune;
ALTER TABLE phpbb_forums           RENAME TO xyz14xyz_forums;
ALTER TABLE phpbb_groups           RENAME TO xyz14xyz_groups;
ALTER TABLE phpbb_posts            RENAME TO xyz14xyz_posts;
ALTER TABLE phpbb_posts_text       RENAME TO xyz14xyz_posts_text;
ALTER TABLE phpbb_privmsgs         RENAME TO xyz14xyz_privmsgs;
ALTER TABLE phpbb_privmsgs_text    RENAME TO xyz14xyz_privmsgs_text;
ALTER TABLE phpbb_ranks            RENAME TO xyz14xyz_ranks;
ALTER TABLE phpbb_search_results   RENAME TO xyz14xyz_search_results;
ALTER TABLE phpbb_search_wordlist  RENAME TO xyz14xyz_search_wordlist;
ALTER TABLE phpbb_search_wordmatch RENAME TO xyz14xyz_search_wordmatch;
ALTER TABLE phpbb_sessions         RENAME TO xyz14xyz_sessions;
ALTER TABLE phpbb_smilies          RENAME TO xyz14xyz_smilies;
ALTER TABLE phpbb_themes           RENAME TO xyz14xyz_themes;
ALTER TABLE phpbb_themes_name      RENAME TO xyz14xyz_themes_name;
ALTER TABLE phpbb_topics           RENAME TO xyz14xyz_topics;
ALTER TABLE phpbb_topics_watch     RENAME TO xyz14xyz_topics_watch;
ALTER TABLE phpbb_user_group       RENAME TO xyz14xyz_user_group;
ALTER TABLE phpbb_users            RENAME TO xyz14xyz_users;
ALTER TABLE phpbb_vote_desc        RENAME TO xyz14xyz_vote_desc;
ALTER TABLE phpbb_vote_results     RENAME TO xyz14xyz_vote_results;
ALTER TABLE phpbb_vote_voters      RENAME TO xyz14xyz_vote_voters;
ALTER TABLE phpbb_words            RENAME TO xyz14xyz_words;

            • If you have tables that are not listed above you have to change them, too
            • Some sloppy programmed phpBB mods will need to be changed if they assume that 'phpbb_' is the prefix.
            • Read
for more about SQL injection hacks.



posted by knn
  

Tip 5: Prevent cookie-password-hashes cracks



Cookie cracks are hacks where the attacker logs in as admin (or any other user) by manipulating a cookie on his own harddisk. Modern browsers refuse to accept manual changes in cookie files, but there are some ways around...

These attacks only work if you have "auto-login" enabled. Disabling "auto login" will keep cookie crackers out but will mean a hassle for your users, since they have to login everytime they visit your website.

Thus you may add the following code.
• It will disable auto login EXCEPT if a user tries to login from an IP address he has used to post something.
• For the admin it will add an ADDITIONAL security: It will allow auto-login only from the IPs you specify.
• You may specify comma separated IPs and IP ranges. e.g. "213.64.[18-19].0,119.129.117.[0-128],14.19.180.67" Thumb Up


In other words: Autologin stays as before, except if someone tries to login from unusual IPs.

To add this mod to your phpBB do the following:
    • Open in "includes/sessions.php"
    • Find

if ( $auto_create )
        { 

    • Add after:

@include_once('allowedadminipsforautologin.php');
if (!
allow_autologin_based_on_ips($userdata,$user_ip))
    {
    unset(
$sessiondata['autologinid']);
    } 

    • Edit "allowedadminipsforautologin.php" to add your allowed admin IPs
    • You can also edit "allowedadminipsforautologin.php" to set whether you want a strict IP check for users (= non admins) or a loose one or to always allow autologin for non-admins regardless of their IP.
    • Upload into the "includes/" folder the attached file (see below) "allowedadminipsforautologin.php".


Warning: If you think that you are on a safe side, just because you have updated to the newest phpBB version, then you are mistaken.
• Who can guarantee you that a hacker hasn't hack you silently 1 year ago and still can exploit this bug (= still has the old password hashes)?
• Who can guarantee you that a hacker hasn't hacked SOME OTHER INSECURE phpBB board and uses their hashes. If you used the same password at that other board then the hacker can use that to log in.
• Who can guarantee you, that another phpBB admin is a good guy? Maybe you used the same password at another board and the admin now tries to hack into your board?


In other words: Install my mod AND rename your admin/ folder (see tip above).


allowedadminipsforautologin.zip
Contains 1 .php file - Upload it into your includes/ folder. Ver 1.3.0
Download 1.48 KB



posted by knn
  

Tip 6: No more Santy worms (%2527 vulnerability)



Prevent future cracks that abuse the 'preg_replace()' exploits = 'highlight' vulnerability = Santy worm

This is probably the WORST of all bugs. Most forums run on servers that host a lot of other domains. This hack allows an attacker to gain control over the whole machine.
In other words: 1 unsecured phpBB forum can open the door for complete destruction of all other websites on that server (can be several thousand websites). In other words: You don't even have to know any of the websites but if only 1 phpBB forum exists on that server then an attacker may be able to delete each and every website, spy passwords out, distribute child porn and abuse the server to attack more unsafe phpBB discussion boards.

TIP: Use ".htaccess" to disallow certain hostile URLs that could contain malicious code.
    • Open/Create ".htaccess" in the folder where your forum is located
    • Add the following lines:

RewriteEngine on
RewriteCond
%{HTTP_REFERER} ^.*$
RewriteRule ^.*%27.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*%25.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*rush=.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*echr.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*esystem.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*wget.*$ http://127.0.0.1/ [redirect,last]

# prevent pre php 4.3.10 bug
RewriteCond %{HTTP_COOKIE}% s:(.*):\%22test1\%22\%3b
RewriteRule
^.*$ http://127.0.0.1/ [R,L]

# prevent perl user agent (most often used by santy)
RewriteCond %{HTTP_USER_AGENT} ^lwp.* [NC]
RewriteRule ^.*$ http://127.0.0.1/ [R,L]
RewriteCond %{HTTP_REFERER} ^.*$

    • That will disallow all URLs containing %2527
    • Moreover it will also protect you against other bugs and worms
    • See .htaccess rewrite  for more info about ".htaccess" files.
    • These 2 lines will not only protect you, but lower the traffic caused by these hacking attempts.
    • To check whether your protection works type

http://www.yoursite.com/forum/xxxx%2527xxxx

If it redirects you away from your site (or gives you an error) then it works.


TIP: Search for

urldecode

or

rawurldecode

in your .php files. Usually there is NO REASON why anyone should use "urldecode" do decode user input. If you find "urldecode" then make sure it is used as part of a hacking prevention measure and not as normal means to decode user input.


posted by knn
  

Tip 7: Be the only forum admin / forum mod



Make yourself the only one who can become admin = no other registered user (or intruder) can gain admin rights.
    • Open "includes/sessions.php"
    • Find

$auto_login_key $userdata['user_password']; 

    • After add:

if (($userdata['user_level'] == ADMIN))
    {
    
$userdata['user_level'] = $userdata['user_level'] && ($user_id == 2);
    } 



If you want to be the only admin AND the only mod
    • then use INSTEAD:

if (($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD))
    {
    
$userdata['user_level'] = $userdata['user_level'] && ($user_id == 2);
    } 



This Tip prevents the following:
A user signing up as a new user and making himself a mod/admin by manipulating the database.
So even if he is a "mod as per database" he wouldn't become a mod. That mod is not too powerful, since anyone who can manipulate the database can do some other harm to the databse. But it's a simple mod and it can frustrate attackers.


posted by knn
  

Tip 8: Log everything that happens / Trace intruders



OK, this will not prevent anything, but it helps you to find out what happened, should a 'hack in' occur

TIP: Add database logging. If you use MySQL then do the following:
    • Telnet to your server (or whatever you do to access your machine)
    • Open "my.cnf" (on the machine where MySQL is running)
    • Add the line

log-bin

under the

[mysqld]

section (yes, the line consists of this 1 word only). For more information see mysqlbinlog  and MySQL "Binary Log" 
    • Binary Database Logging will slow down your database by approx. 1%


TIP: Add the "phpBB IP Logger Mod" (phpbb "IP Logger" )


posted by knn
  

Tip 9: Stop SQL injection hacks in your phpBB forum



Add the following php code to stop SQL injections cracks

TIP: If you haven't updated to a phpBB version >= 2.0.10 do at least the following
    • Open "common.php"
    • Find

$board_config = array();

    • Before add:

if (!get_magic_quotes_gpc())
    {
    
unfck_gpc();
    }

function
unfck($v)
    {
    return
is_array($v) ? array_map('unfck', $v) : addslashes($v);
    }

function
unfck_gpc()
    {
    foreach (array(
'POST', 'GET', 'REQUEST', 'COOKIE') as $gpc)
        {
        
$GLOBALS["_$gpc"] = array_map('unfck', $GLOBALS["_$gpc"]);
        }
    }

    • phpBB 2.0.10 and newer has a similar code already thus you don't need to add it.



posted by knn
  

Tip 10: Tips for programmers how to write secure PHP code



Tips for programmers: If you are a programmer yourself (= if you make your own mods) then prevent SQL injection exploits and other attacks by following these tips:

TIP: Never use "urldecode" or "rawurldecode"

TIP: If you expect a number as user input, then make sure you use

$userinput = intval($userinput);



TIP: If you want to output a user input (user -> html) then use

$output = htmlspecialchars($user_input)



TIP: Always use quotes if you use a user input in an SQL query
    • 

GOOD: SELECT username ... where username = '$user_input'

    • 

BAD: SELECT username ... where username = $user_input




posted by knn
  

Tip 11:Encrypt config.php that contains clear text passwords



A weak point in phpBB installations is that "config.php" contains the database password and the table prefix as clear text = unencoded.

It reads something like

$dbuser 'admin';
$dbpasswd 'abc123';
$table_prefix 'phpbb_'



Usually there is no way someone can view this file, but don't be so sure if there won't be some crack around. Actually there was a bug in PHP recently (not in phpBB but in PHP itself) that made it possible that intruders spy config.php out.

Also, when the %2725 bug hit the internet (see above) intruders could view "config.php" in clear text.

TIP A: I have written a mod that lets you use encrypted values for your phpBB config.php file:
• Download the attachment (see below)
• Upload "secureconfig.php" and "a.php" into the folder where your phpbb forum is located
• Set the attributes of a.php to "world writable" (666)
• Run "secureconfig.php" and replace the three parameters ($dbuser, $dbpasswd, $table_prefix) as "secureconfig.php" tells you when you run it.
• Delete "secureconfig.php"


This security mod encrypts/decrypts the 3 values using the "server path"

$_SERVER['DOCUMENT_ROOT'

as the key.

The server path (= the path where your phpBB is installed) is something like

/home/users/tp1983/forumfolder

and is pretty unique for each phpBB installation. Even on the same server this path differs for each phpBB installation.

Thus EVEN IF AN ATTACKER knows the decryption algorithm (from the attached file a.php) AND knows the encrypted password, he couldn't decrypt anything because the server path is unknown to him.

In other words: It's pretty secure. An intruder would have to find out your server path (which is unlikely unless an attacker has FTP access) AND he would have to know the code of "a.php" (which is unlikely, unless he knows in-my-opinion.org) AND he would need to install "a.php" somewhere AND he would have to modify it a bit.

Please note: If your path changes then you have to rerun the program.
• Open "config.php"
• Type in the clear text (= unencoded values) for the three parameters ($dbuser, $dbpasswd, $table_prefix)
• Upload "secureconfig.php" and "a.php" again
• Rerun "secureconfig.php"


TIP B: Don't use the same password for your database as you use for your FTP login or for phpBB login.

Make sure, when you edit your config.php, that the last line does not contain any character (not even a space or a newline) and contains only 2 characters:

?> 




Encrypt Your Config.php 1.0.1.zip
Consists of 2 files
Download 2.42 KB



posted by knn
  

Tip 12: More protection with .htaccess



I have already mentioned above how you can use the .htaccess file to protect yourself against the Santy worm.

Please also add the line

Options -Indexes

to your .htaccess so that NO FILES will be listed in folders where an index.htm (or an index.php,...) is missing but an error 403 will be given instead.


posted by knn
  

Tip 13: Don't let anybody abuse your highlight function



The highlight exploit was the basis of the Santy Worm (see above).

If we assume that noone actually searches for characters like

][\/%():><{}`

then we make our lives a lot of safer with this mod:
• Open "viewtopic.php"
• Find

if ( isset($HTTP_GET_VARS['highlight']) )
{

• After add:

$HTTP_GET_VARS['highlight'] = addslashes(preg_replace('#[\]\[\\\\\/%\(\):><{}`]#',' ',$HTTP_GET_VARS['highlight']));



We shouldn't need such characters anyway, since even Google filters them out. In other words: For Google "\[]love%s]" is the same as "love s".


posted by knn
  

Tip 14: Replace the native [url] handling



phpBB asks you to use this code:

// matches a [url]xxxx://www.phpbb.com[/url] code..
$patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];

// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];

// [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];

// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";


Do you trust this monster? Me not.

It calls the [ url ] handling 4 times and has been used (prior to 2.0.17) to steal cookies/passwords. Since 2.0.17 the code has been fixed, but I still don't trust it.

Thus open bbcode.php and find the 4 lines that start with

$patterns[] = "#\[url

and are followed by

$replacements[] =



Delete all these 8 lines and replace all 8 lines with the following

$security_threat_chars = ' \t\r\n\'\"\`\[\]\<\>\\\\';
$text = preg_replace('$\[url=?.*?(http://|ftp://)?(www[.])?([a-zA-Z0-9-.]+)([^'.$security_threat_chars.']*).*?\[\/url\]$i','<a href="
http://\\1\\2\\3\\4" title="http://\\1\\2\\3\\4" target="_blank" class="postlink">\\3...</a>',$text);
$text = preg_replace('$"http://(http://|ftp://)$i','"\\1',$text); // Replace a double "http://http://" to -> "http://"


A nice side effect is that
• long URLs get cut and don't distort the width of your forum
• the "www." doesn't get displayed

So we are actually not only fixing a possible security hole but we are enhancing the URL handling


posted by knn
  



Goto page
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19  Next

Reply to topic
Goto page
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19  Next






RegisterRegister
Log inLog in
The time now is 4 July 2009, 01:19
php B.B.