forked from longhoangwkm/katapaty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix error when pw contain special character - CGI.escape
- Loading branch information
1 parent
ca2d4a5
commit 1ebae85
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,13 @@ class Configuration | |
|
||
def counterparty_url | ||
return 'http://rpc:[email protected]:14000/api/' unless @host | ||
"#{protocol}://#{@username}:#{@password}@#{@host}:#{@port}/api/" | ||
"#{protocol}://#{@username}:#{CGI.escape(@password)}@#{@host}:#{@port}/api/" | ||
end | ||
|
||
def counterblock_url | ||
return 'http://rpc:[email protected]:14100/api/' unless @block_host | ||
authen = '' | ||
authen = "#{@block_username}:#{@block_password}@" if @block_username | ||
authen = "#{@block_username}:#{CGI.escape(@block_password)}@" if @block_username | ||
"#{protocol}://#{authen}#{@block_host}:#{@block_port}/api/" | ||
end | ||
|
||
|