mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
37 lines
823 B
Ruby
37 lines
823 B
Ruby
require "httparty"
|
|
|
|
# BAD
|
|
HTTParty.get("http://example.com/", verify: false)
|
|
|
|
# BAD
|
|
HTTParty.get("http://example.com/", verify_peer: false)
|
|
|
|
# BAD
|
|
HTTParty.get("http://example.com/", { verify_peer: false })
|
|
|
|
# BAD
|
|
HTTParty.post("http://example.com/", body: "some_data", verify: false)
|
|
|
|
# BAD
|
|
HTTParty.post("http://example.com/", { body: "some_data", verify: false })
|
|
|
|
# GOOD
|
|
HTTParty.get("http://example.com/")
|
|
|
|
# GOOD
|
|
HTTParty.get("http://example.com/", verify: true)
|
|
|
|
# GOOD
|
|
HTTParty.get("http://example.com/", verify_peer: true)
|
|
|
|
# GOOD
|
|
HTTParty.post("http://example.com/", body: "some_data")
|
|
|
|
# GOOD
|
|
HTTParty.post("http://example.com/", body: "some_data", verify: true)
|
|
|
|
# GOOD
|
|
HTTParty.post("http://example.com/", { body: "some_data" })
|
|
|
|
# GOOD
|
|
HTTParty.post("http://example.com/", { body: "some_data", verify: true }) |