~grubng-dev/grubng/tools-urlsdb

« back to all changes in this revision

Viewing changes to ParseURLs.cs

  • Committer: thindil
  • Date: 2011-05-11 08:47:58 UTC
  • Revision ID: thindil2@gmail.com-20110511084758-ibd452eilibrln9p
remove more sessions id's from URL

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
                        {
101
101
                                return String.Empty;
102
102
                        }
103
 
                        //Remove PHPSESID from path
 
103
                        //Remove sessions id's from path
104
104
                        if (path.Length > 1)
105
105
                        {
106
 
                                path = Regex.Replace(path, @"(&|\?|&)*PHPSESSID=\w+", String.Empty, RegexOptions.IgnoreCase);
 
106
                                path = Regex.Replace(path, @"(&|\?|&)*(PHPSESSID|s)=[a-z0-9]{32}(&|&)*", String.Empty, RegexOptions.IgnoreCase);
 
107
                                path = Regex.Replace(path, @"{&|&)+^", String.Empty);
107
108
                        }
108
109
                        url = host + path;
109
110
                        url = System.Web.HttpUtility.UrlEncode(host + path);