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
1221
1221
end
1222
1222
end
1223
1223
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
-
1231
1224
# The username of the proxy server, if one is configured.
1232
1225
def proxy_user
1233
- if ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE && @proxy_from_env
1226
+ if @proxy_from_env
1234
1227
user = proxy_uri &.user
1235
1228
unescape ( user ) if user
1236
1229
else
@@ -1240,7 +1233,7 @@ def proxy_user
1240
1233
1241
1234
# The password of the proxy server, if one is configured.
1242
1235
def proxy_pass
1243
- if ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE && @proxy_from_env
1236
+ if @proxy_from_env
1244
1237
pass = proxy_uri &.password
1245
1238
unescape ( pass ) if pass
1246
1239
else
Original file line number Diff line number Diff line change @@ -178,13 +178,8 @@ def test_proxy_eh_ENV_with_user
178
178
http = Net ::HTTP . new 'hostname.example'
179
179
180
180
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
188
183
end
189
184
end
190
185
@@ -195,13 +190,8 @@ def test_proxy_eh_ENV_with_urlencoded_user
195
190
http = Net ::HTTP . new 'hostname.example'
196
191
197
192
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
205
195
end
206
196
end
207
197
You can’t perform that action at this time.
0 commit comments