You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have been using double quotes for multiline values and got an error saying my key was an invalid PEM key.
I think the issue was tabs (\t) being inserted by the editor. Removing the \t on each line so the first letter hugs the left side of your editor without whitespace seemed to solve the issue.
Maybe remove all whitespace from the key before parsing it? Somewhere around here?
Thanks for the report :) However, I don’t think this should be handled by the plugin itself. The issue arises because the plugin expects a valid PEM, but the user-provided input is invalid due to extra whitespace inserted within the data.
I would not recommend implementing the tricks here. As the logic is already super clear and clean -- it expects a PEM and as long as the given data is not PEM due to any reason, it throws an error.
Well, following your own logic you could delete line 516 as well ;)
I have no particular investment in this so feel free to ignore my opinion but removing whitespace would'nt have any impact on runtime performance as the PEM is validated on startup (this is right, right?) but would make the software more robust to use.
The alternative - aside from not changing anything - could be to add a remark in the FAQ in the README.md but I don't quite feel this is a good developer experience.
Have been using double quotes for multiline values and got an error saying my key was an invalid PEM key.
I think the issue was tabs (\t) being inserted by the editor. Removing the \t on each line so the first letter hugs the left side of your editor without whitespace seemed to solve the issue.
Maybe remove all whitespace from the key before parsing it? Somewhere around here?
caddy-jwt/jwt.go
Line 516 in 9029841
The text was updated successfully, but these errors were encountered: