Go Back   Pligg CMS Forum > Other > Retired Threads

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-17-2006, 05:52 PM
New Pligger
 
Join Date: Jan 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Invalid URL problem in get($url)

With the Jan 16, 2005 pligg beta5 I noticed that when I submitted a story without filling in the URL -- leaving it as http:// -- the program believed it was valid. The problem was the same with a single letter URL --> http://a

I solved the problem with the following change to the get($url) function in libs/link.php:

Code:
function get($url) {
 $url=trim($url);

 if( !preg_match( '/^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}'
                   .'((:[0-9]{1,5})?\/.*)?$/i' ,$url))
               {
                $this->valid = false; return;
               }
A couple of lines down I notice the following test:

Code:
if(!($this->html = $xxx))  { return; }
Shouldn't that read

Code:
if(!($this->html === $xxx))
Reply With Quote
  #2 (permalink)  
Old 03-28-2006, 11:27 PM
New Pligger
 
Join Date: Mar 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
I'm having a problem in version 7 that no matter what URL I enter, it returns an "Invalid URL". This causes pligg to be pretty much useless. Any idea how I could correct this?
Reply With Quote
  #3 (permalink)  
Old 03-28-2006, 11:46 PM
New Pligger
 
Join Date: Mar 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Hey I changed the line you suggest above just to see if that would work. It did and took care of the problem.

Great job spotting that !!!!!!
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with template in IE7 xsillence General Help 2 08-29-2007 11:30 PM
upgrading to 9.6 yathosho Installation and Upgrade Help 6 07-08-2007 07:05 AM
Problem - only one domain invalid or blocked Andtony General Help 1 04-11-2007 10:24 AM
Login problem with invalid url philmckinney Bug Report 2 09-17-2006 12:19 AM
no luck solving the invalid url problem endph Installation and Upgrade Help 0 07-30-2006 08:54 PM


Search Engine Friendly URLs by vBSEO 3.2.0