note need to limit download size
This commit is contained in:
parent
ca15b8faf0
commit
87e49578f7
5
node.js
5
node.js
|
@ -27,13 +27,16 @@ ACME.challengeTests = {
|
||||||
return me._request({ url: url }).then(function (resp) {
|
return me._request({ url: url }).then(function (resp) {
|
||||||
var err;
|
var err;
|
||||||
|
|
||||||
|
// TODO limit the number of bytes that are allowed to be downloaded
|
||||||
if (auth.keyAuthorization === resp.body.toString('utf8').trim()) {
|
if (auth.keyAuthorization === resp.body.toString('utf8').trim()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = new Error(
|
err = new Error(
|
||||||
"Error: Failed HTTP-01 Dry Run.\n"
|
"Error: Failed HTTP-01 Dry Run.\n"
|
||||||
+ "curl '" + url + "' does not return '" + auth.keyAuthorization + "'\n"
|
+ "curl '" + url + "'\n"
|
||||||
|
+ "Expected: '" + auth.keyAuthorization + "'\n"
|
||||||
|
+ "Got: '" + resp.body + "'\n"
|
||||||
+ "See https://git.coolaj86.com/coolaj86/acme-v2.js/issues/4"
|
+ "See https://git.coolaj86.com/coolaj86/acme-v2.js/issues/4"
|
||||||
);
|
);
|
||||||
err.code = 'E_FAIL_DRY_CHALLENGE';
|
err.code = 'E_FAIL_DRY_CHALLENGE';
|
||||||
|
|
Loading…
Reference in New Issue