web-push-libs / vapid

Apps and Libraries to support WebPush VAPID
Mozilla Public License 2.0
90 stars 27 forks source link

Host validation for 'sub' does not allow domains containing hyphen #94

Closed ngdio closed 3 years ago

ngdio commented 3 years ago

The host validation introduced in https://github.com/web-push-libs/vapid/commit/871d67da40ca7bd8fff69b1555b517029f707ea4 does not allow domains that contain hyphens to pass through the check, although they should be perfectly valid domains.

Working: test@testingthis.org

Not working: test@testing-this.org

This is also causing the issue described in https://github.com/home-assistant/core/issues/48766.

wshuman3 commented 3 years ago

I believe the PR that introduced this was #92 not #91

wshuman3 commented 3 years ago

96 should resolve this issue