Advertisement:

Author Topic: 2.0.2, Spaces in website links  (Read 2671 times)

Offline Doctor Deejay

  • On Hiatus
  • SMF Hero
  • *
  • Posts: 3,491
  • Gender: Male
2.0.2, Spaces in website links
« on: May 04, 2012, 06:34:02 PM »
G'day, so I was searching for some bugs and I found one. Mostly, a forum has some members. Some have many. The thing is, sometimes there are morons who think they're cool and try breaking stuff. So, what did uncle 医生唱片骑师 do? Well, uncle 医生唱片骑师 added a website to his profile. But, because he likes breaking stuff, this was his link: http://I have asite.com. He saved it and try to click on it. It didn't work, because it contained spaces. So, I think there should be an url validator to keep morons happy and the users that click on their links. No mods installed, default theme.
« Last Edit: August 22, 2012, 01:01:10 PM by Trekkie101 »
Doctor Deejay                                        I understand everything... except that wig. - Jack Sparrow
Simple Machines LocalizerDon't pm me for support
deejay [at] simplemachines [dot] orgGet To Know The Team - Dr. Deejay

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,046
  • Master of BBC Abuse
Re: 2.0.2, Spaces in website links
« Reply #1 on: May 04, 2012, 06:38:17 PM »
So you're saying that if someone enters an invalid url it wont work, and this means there is a bug in the software? :D
"My idea of heaven consists of all the things I would go to Hell for."

I need another coding language like I need tertiary syphilis.

Antechinus modzRantyheinous themez - PSD pack for 2.0.x default theme

Offline Doctor Deejay

  • On Hiatus
  • SMF Hero
  • *
  • Posts: 3,491
  • Gender: Male
Re: 2.0.2, Spaces in website links
« Reply #2 on: May 04, 2012, 06:43:07 PM »
Nope, but I do think it's good to validate urls by using something like rawurlencode(). :)
Doctor Deejay                                        I understand everything... except that wig. - Jack Sparrow
Simple Machines LocalizerDon't pm me for support
deejay [at] simplemachines [dot] orgGet To Know The Team - Dr. Deejay

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,046
  • Master of BBC Abuse
Re: 2.0.2, Spaces in website links
« Reply #3 on: May 04, 2012, 06:46:44 PM »
Quote
searching for some bugs and I found one

Quote
you're saying that if someone enters an invalid url it wont work, and this means there is a bug in the software

Hey ho.
"My idea of heaven consists of all the things I would go to Hell for."

I need another coding language like I need tertiary syphilis.

Antechinus modzRantyheinous themez - PSD pack for 2.0.x default theme

Offline Doctor Deejay

  • On Hiatus
  • SMF Hero
  • *
  • Posts: 3,491
  • Gender: Male
Re: 2.0.2, Spaces in website links
« Reply #4 on: May 04, 2012, 06:48:23 PM »
Well to be honest, I can't recall this a bug nor a feature, so I decided to go for a bug report instead. :P
Doctor Deejay                                        I understand everything... except that wig. - Jack Sparrow
Simple Machines LocalizerDon't pm me for support
deejay [at] simplemachines [dot] orgGet To Know The Team - Dr. Deejay

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,046
  • Master of BBC Abuse
Re: 2.0.2, Spaces in website links
« Reply #5 on: May 04, 2012, 06:50:11 PM »
I'm all in favour of making morons suffer for their stupidity. Natural selection and all that. ;)
"My idea of heaven consists of all the things I would go to Hell for."

I need another coding language like I need tertiary syphilis.

Antechinus modzRantyheinous themez - PSD pack for 2.0.x default theme

Offline MrPhil

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,645
Re: 2.0.2, Spaces in website links
« Reply #6 on: May 04, 2012, 07:04:50 PM »
Natural selection doesn't work fast enough...

Anyway, it's very common to have something like mySite.com or sample.com, which don't go to real sites. As long as it doesn't cause the browser to blow up (at least, in a way that threatens site security or lets the browser into places it shouldn't go), and I've never seen that, I say just leave it alone. If fools want to waste their time pressing on shiny links, let 'em. It keeps them occupied and out of the way...
Please do not PM me with support questions, unless I ask you to. Unsolicited PMs for support will be ignored. It's best to have questions and answers in public, so others can research a problem and learn about it without having to ask the question yet again. Thank you!
FAQs | SMF 1.1 fixes | Project ideas
-= From the ashes shall rise a sooty tern =-

Offline Storman™

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,422
Re: 2.0.2, Spaces in website links
« Reply #7 on: May 05, 2012, 08:41:37 AM »
Quote
I'm all in favour of making morons suffer for their stupidity. Natural selection and all that.

Agree +1   ;)

Like MrPhil, I say leave alone as there may be a legitimate reason why someone enters a url like that. Doesn't necesaariliy mean it's a real url that goes somewhere.

Guess an option would be to have a mod that does as you ask and maybe throws up an error message. However, certainly don't think this should be part of core functionality nor should it be considered a "bug".
Any Backup method is bettter than no Backup method....

Offline Trekkie101

  • Doc Writer
  • SMF Hero
  • *
  • Posts: 8,100
  • Gender: Male
  • Ad Astra!
    • https://www.facebook.com/DLRPRoundup on Facebook
    • @trekkie101 on Twitter
    • DLRP Roundup
Re: 2.0.2, Spaces in website links
« Reply #8 on: August 22, 2012, 01:00:55 PM »
We should validate our inputs, just as good practice, I think we should fix it for 2.1.

Offline MrPhil

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,645
Re: 2.0.2, Spaces in website links
« Reply #9 on: August 22, 2012, 04:33:25 PM »
"Validating inputs" implies that it should be fixed or rejected as soon as someone clicks the Submit button. Are there any cases where BBCode etc. is checked upon input, rather than upon output? I think it would be more practical (if you want to do something about it) to check upon output for invalid characters in the href string. Ditto for images, etc.

Of course, from the resources-used point of view, it's better to format a post (process BBCode) up front once upon saving and save the processed version alongside the raw markup. It's possible that there might be some tags not resolvable until output time, but at least most of the BBCode processing will have been done ahead of time, saving server resources by not formatting over and over.

I still don't think it's worthwhile to worry about malformed URLs, unless it can be shown that it's a browser stability or security issue. Of course, others may feel differently. As I said before, sometimes they're not intended to be real domains or URLs, and it would be unnecessarily confusing to have error messages pop up (possibly better to highlight the presumed URL in some odd color and leave it inactive?).
Please do not PM me with support questions, unless I ask you to. Unsolicited PMs for support will be ignored. It's best to have questions and answers in public, so others can research a problem and learn about it without having to ask the question yet again. Thank you!
FAQs | SMF 1.1 fixes | Project ideas
-= From the ashes shall rise a sooty tern =-

Offline Trekkie101

  • Doc Writer
  • SMF Hero
  • *
  • Posts: 8,100
  • Gender: Male
  • Ad Astra!
    • https://www.facebook.com/DLRPRoundup on Facebook
    • @trekkie101 on Twitter
    • DLRP Roundup
Re: 2.0.2, Spaces in website links
« Reply #10 on: August 22, 2012, 05:58:31 PM »
I didn't mean in the posts/BBCode, just the profile website link, hopefully thats simpler to verify to be accurate :)

I think we're on separate issues.