wildcard support? #9

Stängd
opened 2018-04-27 14:26:09 +00:00 by Ghost · 5 kommentarer

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.
Ägare

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. :)
Author

sweet :)

sweet :)
Ägare

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 ```
Ägare

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. :)
Author

woo hoo! yup, works :)

woo hoo! yup, works :)
coolaj86 refererade till detta ärende från en incheckning 2019-11-01 11:10:12 +00:00
Logga in för att delta i denna konversation.
Ingen Etikett
Ingen Milsten
Ingen tilldelad
2 Deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet 'åååå-mm-dd'.

Inget förfallodatum satt.

Beroenden

No dependencies set.

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