Closed danopia closed 2 years ago
oh, I broke something 😢 , I thought nobody was relying on this, but anyway I did it for the sake of security 🙏🏼 .
@juanpicado is there a better way for a plugin to know the verdaccio version? It looks like it's used for compatibility here, just knowing if the version is supported, and which JS/CSS to serve
No yet but is planned for the next major.
There is a section for plugin changes on the roadmap, still fresh for new feedback https://github.com/verdaccio/verdaccio/discussions/1690 if you want to drop your thoughts
Bug Report
Versions
Expected behavior
Verdaccio should be able to start up with the plugin loaded.
Observed behaviour
With Verdaccio 5.4.0, the plugin crashes while validating config:
The
TypeError
is thrown from here:https://github.com/n4bb12/verdaccio-github-oauth-ui/blob/dd4dc88820dd5aab63c9f46681c04dceec9be263/src/server/plugin/Config.ts#L54-L56
This appears to be caused by Verdaccio 5.4.0 defaulting to not having its own user-agent, instead copying the user-agent from the requesting client. Upstream PR: https://github.com/verdaccio/verdaccio/pull/2793
Steps to reproduce
Install the newest version of things:
Run Verdaccio with a config file:
Additional context
Adding
user_agent: true
to the Verdaccio config is a valid workaround for the issue.