It is currently Thu Nov 21, 2019 11:13 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [Done] [5.70] SetURLPart easily crashes
PostPosted: Thu May 09, 2019 10:47 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1675
SetURLPart() is very handy for building URLs, but it is also very strict and easy to crash.

For example, this example crashes if the input doesn't already have a protocol, or a trailing slash, or if the input is empty.

Code:
URL.s = ""                   ; crash
URL.s = "http://google.com"  ; crash
URL.s =        "google.com/" ; crash
URL.s =    "www.google.com/" ; crash
URL.s = "http://google.com/" ; OK

URL = SetURLPart(URL, "q", "query")
Debug URL


I understand if the function expects a strict URL input, but it's just a string operation, it should not cause IMA crashes on missing URL parts.

Cheers!

_________________
On GitHub: PB Includes - IDE Tools - Color Themes


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.70] SetURLPart easily crashes
PostPosted: Fri May 10, 2019 12:08 am 
Offline
Addict
Addict
User avatar

Joined: Tue Mar 02, 2004 1:20 pm
Posts: 1032
Location: Amphibios 9
kenmo wrote:
SetURLPart() is very handy for building URLs, but it is also very strict and easy to crash.

confirmed.

kenmo wrote:
I understand if the function expects a strict URL input, but it's just a string operation, it should not cause IMA crashes on missing URL parts.

+1

Greetings ... Peter

_________________
Can't decide if i need a hug, an XXL coffee, 6 shots of vodka or 2 weeks of sleep.


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.70] SetURLPart easily crashes
PostPosted: Fri May 24, 2019 9:53 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13629
Location: France
Fixed.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye