Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

Commit afbb01b

Browse files
author
Adis Nezirovic
committed
MINOR: Be more strict about Content-Type before returning cert.
1 parent 7ac5bd7 commit afbb01b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

acme.lua

+5
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,11 @@ local function new_order(applet)
405405
if resp and resp.status_code == 200 then
406406
local resp_json = resp:json()
407407

408+
if not resp.headers["content-type"] == "application/pem-certificate-chain" then
409+
return http.response.create{status_code=500,
410+
content="Wrong content type"}:send(applet)
411+
end
412+
408413
if not resp_json.certificate then
409414
return http.response.create{status_code=500, content="No cert"}:send(applet)
410415
end

0 commit comments

Comments
 (0)