File tree Expand file tree Collapse file tree 2 files changed +6
-23
lines changed
Expand file tree Collapse file tree 2 files changed +6
-23
lines changed Original file line number Diff line number Diff line change @@ -1221,16 +1221,9 @@ def proxy_port
12211221 end
12221222 end
12231223
1224- # [Bug #12921]
1225- if /linux|freebsd|darwin/ =~ RUBY_PLATFORM
1226- ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE = true
1227- else
1228- ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE = false
1229- end
1230-
12311224 # The username of the proxy server, if one is configured.
12321225 def proxy_user
1233- if ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE && @proxy_from_env
1226+ if @proxy_from_env
12341227 user = proxy_uri &.user
12351228 unescape ( user ) if user
12361229 else
@@ -1240,7 +1233,7 @@ def proxy_user
12401233
12411234 # The password of the proxy server, if one is configured.
12421235 def proxy_pass
1243- if ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE && @proxy_from_env
1236+ if @proxy_from_env
12441237 pass = proxy_uri &.password
12451238 unescape ( pass ) if pass
12461239 else
Original file line number Diff line number Diff line change @@ -178,13 +178,8 @@ def test_proxy_eh_ENV_with_user
178178 http = Net ::HTTP . new 'hostname.example'
179179
180180 assert_equal true , http . proxy?
181- if Net ::HTTP ::ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE
182- assert_equal 'foo' , http . proxy_user
183- assert_equal 'bar' , http . proxy_pass
184- else
185- assert_nil http . proxy_user
186- assert_nil http . proxy_pass
187- end
181+ assert_equal 'foo' , http . proxy_user
182+ assert_equal 'bar' , http . proxy_pass
188183 end
189184 end
190185
@@ -195,13 +190,8 @@ def test_proxy_eh_ENV_with_urlencoded_user
195190 http = Net ::HTTP . new 'hostname.example'
196191
197192 assert_equal true , http . proxy?
198- if Net ::HTTP ::ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE
199- assert_equal "Y\\ X" , http . proxy_user
200- assert_equal "R%S] ?X" , http . proxy_pass
201- else
202- assert_nil http . proxy_user
203- assert_nil http . proxy_pass
204- end
193+ assert_equal "Y\\ X" , http . proxy_user
194+ assert_equal "R%S] ?X" , http . proxy_pass
205195 end
206196 end
207197
You can’t perform that action at this time.
0 commit comments