wildcard support? #9

Cerrada
abierta 2018-04-27 14:26:09 +00:00 por Ghost · 5 comentarios

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.
Propietario

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. :)
Autoría

sweet :)

sweet :)
Propietario

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 ```
Propietario

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. :)
Autoría

woo hoo! yup, works :)

woo hoo! yup, works :)
coolaj86 cerró esta incidencia 2018-04-27 18:08:02 +00:00
Inicie sesión para unirse a esta conversación.
Sin etiquetas
Sin Milestone
No asignados
2 participantes
Notificaciones
Fecha de vencimiento
La fecha de vencimiento es inválida o está fuera de rango. Por favor utilice el formato 'aaaa-mm-dd'.

Sin fecha de vencimiento.

Dependencias

No se han establecido dependencias.

Referencia: coolaj86/greenlock.js-ARCHIVED#9
No se ha proporcionado una descripción.