mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 23:48:44 +08:00
SECURITY: Limit URL length for theme remote (#20787)
This commit is contained in:
@ -241,6 +241,12 @@ RSpec.describe Admin::ThemesController do
|
||||
expect(response.status).to eq(422)
|
||||
end
|
||||
|
||||
it "fails to import with a failing status" do
|
||||
post "/admin/themes/import.json", params: { remote: "https://#{"a" * 10_000}.com" }
|
||||
|
||||
expect(response.status).to eq(422)
|
||||
end
|
||||
|
||||
it "can lookup a private key by public key" do
|
||||
Discourse.redis.setex("ssh_key_abcdef", 1.hour, "rsa private key")
|
||||
|
||||
|
Reference in New Issue
Block a user