wildcard support? #9

Chiuso
aperto 2018-04-27 14:26:09 +00:00 da Ghost · 5 commenti

I was getting invalid domain name error when doing *.example.com

I changed utils.js
from
var re = /^[a-zA-Z0-9.-]+$/;
to
var re = /^(*.)?[a-zA-Z0-9.-]+$/;

and the it worked :)

Let me know if I'm just completely missing something here though.

to support wildcards.

I was getting invalid domain name error when doing *.example.com I changed utils.js from var re = /^[a-zA-Z0-9\.\-]+$/; to var re = /^(\*\.)?[a-zA-Z0-9\.\-]+$/; and the it worked :) Let me know if I'm just completely missing something here though. to support wildcards.
Proprietario

Ah...

Good catch. I updated the underlying acme-v2.js, and had tested that, but I hadn't actually tested it in greenlock itself.

Thanks so much for the patch!

I really, really appreciate it.

I'll try to fit it in to get that published within a few hours.

:)

Ah... Good catch. I updated the underlying acme-v2.js, and had tested that, but I hadn't actually tested it in greenlock itself. Thanks so much for the patch! I really, really appreciate it. I'll try to fit it in to get that published within a few hours. :)
Autore

sweet :)

sweet :)
Proprietario

Hey m00ki3, Will you test v2.2.7?

This is the change that I made:

var re = /^(\*\.)?[a-zA-Z0-9\.\-]+$/;
> var re = /^(\*\.)?[a-zA-Z0-9\.\-]+$/;
undefined
> re.test('*.example.com')
true
> re.test('example.com')
true
> re.test('example.com.*')
false
> re.test('foobar!')
false
Hey `m00ki3`, Will you test v2.2.7? This is the change that I made: ```js var re = /^(\*\.)?[a-zA-Z0-9\.\-]+$/; ``` ``` > var re = /^(\*\.)?[a-zA-Z0-9\.\-]+$/; undefined > re.test('*.example.com') true > re.test('example.com') true > re.test('example.com.*') false > re.test('foobar!') false ```
Proprietario

At first I read your regex incorrectly because the \ were taken out... but makes sense now. :)

At first I read your regex incorrectly because the `\` were taken out... but makes sense now. :)
Autore

woo hoo! yup, works :)

woo hoo! yup, works :)
coolaj86 chiuso questo probleam 2018-04-27 18:08:02 +00:00
coolaj86 ha fatto riferimento a questa issue dal commit 2019-11-01 11:10:12 +00:00
Effettua l'accesso per partecipare alla conversazione.
Nessuna etichetta
Nessuna milestone
Nessuna assegnatario
2 Partecipanti
Notifiche
Data di scadenza
La data di scadenza non è valida o fuori intervallo. Si prega di utilizzare il formato 'aaaa-mm-dd'.

Nessuna data di scadenza impostata.

Dipendenze

Nessuna dipendenza impostata.

Riferimento: coolaj86/greenlock.js-ARCHIVED#9
No description provided.