forked from root/acme.js
		
	v3.0.9: bugfix error handling
This commit is contained in:
		
							parent
							
								
									e8c46db062
								
							
						
					
					
						commit
						aa324e2a29
					
				
							
								
								
									
										9
									
								
								acme.js
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								acme.js
									
									
									
									
									
								
							@ -775,7 +775,14 @@ ACME._postChallenge = function(me, options, kid, auth) {
 | 
			
		||||
		// REMOVE DNS records as soon as the state is non-processing
 | 
			
		||||
		// (valid or invalid or other)
 | 
			
		||||
		try {
 | 
			
		||||
			options.challenges[auth.type].remove({ challenge: auth });
 | 
			
		||||
			options.challenges[auth.type]
 | 
			
		||||
				.remove({ challenge: auth })
 | 
			
		||||
				.catch(function(err) {
 | 
			
		||||
					err.action = 'challenge_remove';
 | 
			
		||||
					err.altname = auth.altname;
 | 
			
		||||
					err.type = auth.type;
 | 
			
		||||
					ACME._notify(me, options, 'error', err);
 | 
			
		||||
				});
 | 
			
		||||
		} catch (e) {}
 | 
			
		||||
 | 
			
		||||
		if ('valid' === resp.body.status) {
 | 
			
		||||
 | 
			
		||||
@ -33,8 +33,8 @@ M.init = function(me) {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
M._init = function(me, tz, locale) {
 | 
			
		||||
	// prevent a stampede from misconfigured clients in an eternal loop
 | 
			
		||||
	setTimeout(function() {
 | 
			
		||||
		// prevent a stampede from misconfigured clients in an eternal loop
 | 
			
		||||
		me.request({
 | 
			
		||||
			method: 'GET',
 | 
			
		||||
			url: 'https://api.rootprojects.org/api/nonce',
 | 
			
		||||
@ -60,20 +60,19 @@ M._init = function(me, tz, locale) {
 | 
			
		||||
						locale: locale
 | 
			
		||||
					}
 | 
			
		||||
				};
 | 
			
		||||
				return me
 | 
			
		||||
					.request(req)
 | 
			
		||||
					.catch(function(err) {
 | 
			
		||||
						if (me.debug) {
 | 
			
		||||
							console.error(
 | 
			
		||||
								'error adding maintainer to support notices:'
 | 
			
		||||
							);
 | 
			
		||||
							console.error(err);
 | 
			
		||||
						}
 | 
			
		||||
					})
 | 
			
		||||
					.then(function(/*resp*/) {
 | 
			
		||||
						oldCollegeTries[me.maintainerEmail] = true;
 | 
			
		||||
						//console.log(resp);
 | 
			
		||||
					});
 | 
			
		||||
				return me.request(req);
 | 
			
		||||
			})
 | 
			
		||||
			.catch(function(err) {
 | 
			
		||||
				if (me.debug) {
 | 
			
		||||
					console.error(
 | 
			
		||||
						'error adding maintainer to support notices:'
 | 
			
		||||
					);
 | 
			
		||||
					console.error(err);
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
			.then(function(/*resp*/) {
 | 
			
		||||
				oldCollegeTries[me.maintainerEmail] = true;
 | 
			
		||||
				//console.log(resp);
 | 
			
		||||
			});
 | 
			
		||||
	}, me.__timeout || 3000);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
	"name": "@root/acme",
 | 
			
		||||
	"version": "3.0.8",
 | 
			
		||||
	"version": "3.0.9",
 | 
			
		||||
	"lockfileVersion": 1,
 | 
			
		||||
	"requires": true,
 | 
			
		||||
	"dependencies": {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
	"name": "@root/acme",
 | 
			
		||||
	"version": "3.0.8",
 | 
			
		||||
	"version": "3.0.9",
 | 
			
		||||
	"description": "Free SSL certificates for Node.js and Browsers. Issued via Let's Encrypt",
 | 
			
		||||
	"homepage": "https://rootprojects.org/acme/",
 | 
			
		||||
	"main": "acme.js",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user