Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Strange chars in the password

 [1/8] from: reboldes:bigfoot at: 22-Aug-2000 6:00


HI all, I need to connect to a FTP server but the password contains strange chars like #"@" #"\" #"#" I tried to url-encode the password, but it does not work. I'm sure it was already discussed but I cannot find it. thanx for advice oldes

 [2/8] from: allen:rebolforces at: 22-Aug-2000 23:40


----- Original Message ----- From: <[reboldes--bigfoot--com]> To: <[list--rebol--com]> Sent: Wednesday, August 23, 2000 12:00 AM Subject: [REBOL] Strange chars in the password
> HI all, > > I need to connect to a FTP server but the password contains strange chars
like #"@" #"\" #"#"
> I tried to url-encode the password, but it does not work. > I'm sure it was already discussed but I cannot find it. > > thanx for advice > oldes >
Hi Oldes, This allows you to avoid that.. read [ scheme: 'ftp user: "user-name" pass: "password" host: "ftp.securesite.com" path: "private/" target: "file.dat" ] So that you don't have to construct that all the time, you could do use the following code.. ;--------------- config: make object! [pass: "password" user: "username"] authenticate: func [ {Returns a filled scheme block complete with password} url [url!] {The url to parse} /local url-value url-obj ][ url-obj: make net-utils/url-parser [] set url-obj/vars none url-value: url parse/all url url-obj/url-rules ;---Return Url data set compose [ scheme: (to-lit-word url-obj/scheme) user: (config/user) pass: (config/pass) host: (url-obj/host) path: (url-obj/path) target: (url-obj/target) ] ] ;e.g usage ; read authenticate ftp://ftp.securesite.com/private/file.dat ; read authenticate http://www.securesite.com/private/file.dat ;------------------ Cheers, Allen K

 [3/8] from: reboldes:bigfoot at: 2-Sep-2000 6:38


I need to connect to an FTP server but the password contains chars like #"@" or #"\". What can I do? thanks oldes

 [4/8] from: reboldes:bigfoot at: 2-Sep-2000 6:50


I need to connect to FTP but the password contains chars like #"@" or #"\". What can I do? thanks oldes

 [5/8] from: mailinglists:post at: 3-Sep-2000 3:01


Hi, Allen Kamp replied to this earlier this week, I'll repost (hope you don't mind, Allen? =)... Regards, Rachid ----- Original Message ----- From: <[reboldes--bigfoot--com]> To: <[list--rebol--com]> Sent: Wednesday, August 23, 2000 12:00 AM Subject: [REBOL] Strange chars in the password
> HI all, > > I need to connect to a FTP server but the password contains strange
chars like #"@" #"\" #"#"
> I tried to url-encode the password, but it does not work. > I'm sure it was already discussed but I cannot find it. > > thanx for advice > oldes >
Hi Oldes, This allows you to avoid that.. read [ scheme: 'ftp user: "user-name" pass: "password" host: "ftp.securesite.com" path: "private/" target: "file.dat" ] So that you don't have to construct that all the time, you could do use the following code.. ;--------------- config: make object! [pass: "password" user: "username"] authenticate: func [ {Returns a filled scheme block complete with password} url [url!] {The url to parse} /local url-value url-obj ][ url-obj: make net-utils/url-parser [] set url-obj/vars none url-value: url parse/all url url-obj/url-rules ;---Return Url data set compose [ scheme: (to-lit-word url-obj/scheme) user: (config/user) pass: (config/pass) host: (url-obj/host) path: (url-obj/path) target: (url-obj/target) ] ] ;e.g usage ; read authenticate ftp://ftp.securesite.com/private/file.dat ; read authenticate http://www.securesite.com/private/file.dat ;------------------ Cheers, Allen K

 [6/8] from: fantam:mailandnews at: 5-Sep-2000 2:51


> I need to connect to FTP but the password contains chars like #"@" or #"\". What can I do? >From the network protocols document:
You can also open FTP connections by using a port specification rather than a URL. This allows you to use any password, even ones containing special characters that are not easily written in URLs. An example of a port specification to open an FTP connection is: ftp-port: open [ scheme: `ftp host: "ftp.site.com" user: ask "Username? " pass: ask "Password? " ] See the "Specifying Network Resources" section above for more detail. -- Fantam

 [7/8] from: fantam:mailandnews at: 7-Sep-2000 4:55


Very enlightening, but why the local word 'url-value since I can't see it used except for the assignment: url-value: url Can you explain? (Allen?)
> So that you don't have to construct that all the time, you could do use > the
<<quoted lines omitted: 26>>
> Cheers, > Allen K
-- Fantam

 [8/8] from: allen:rebolforces at: 9-Sep-2000 0:51


----- Original Message ----- From: <[Fantam--MailAndNews--com]> To: <[list--rebol--com]> Sent: Thursday, September 07, 2000 12:55 PM Subject: [REBOL] Strange chars in password Re:(2)
> Very enlightening, but why the local word 'url-value since I can't see > it used except for the assignment: > > url-value: url > > Can you explain? (Allen?)
Well spotted! I think it is safe to remove. It is part of some job specific code that I removed from the function before posting, looks like I missed that bit. Cheers, Allen K

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted