Skip to content

Validate plugin name#4636

Merged
alexandrebodin merged 1 commit intomasterfrom
fix/plugin-name
Dec 1, 2019
Merged

Validate plugin name#4636
alexandrebodin merged 1 commit intomasterfrom
fix/plugin-name

Conversation

@alexandrebodin
Copy link
Member

@alexandrebodin alexandrebodin commented Dec 1, 2019

Description of what you did:

My PR is a:

  • 💥 Breaking change
  • 🐛 Bug fix
  • 💅 Enhancement
  • 🚀 New feature

Main update on the:

  • Admin
  • Documentation
  • Framework
  • Plugin

Manual testing done on the following databases:

  • Not applicable
  • MongoDB
  • MySQL
  • Postgres
  • SQLite

@alexandrebodin alexandrebodin added pr: 🐛 Bug fix source: core:admin Source is core/admin package labels Dec 1, 2019
@alexandrebodin alexandrebodin added this to the 3.0.0-beta.17.8 milestone Dec 1, 2019
@alexandrebodin alexandrebodin changed the title Validdate plugin name Validate plugin name Dec 1, 2019
Copy link
Contributor

@lauriejim lauriejim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thank you @alexandrebodin for the quick fix.

@alexandrebodin alexandrebodin merged commit c198c26 into master Dec 1, 2019
@lauriejim lauriejim deleted the fix/plugin-name branch December 1, 2019 22:19
try {
const { plugin } = ctx.params;

if (!/^[A-Za-z0-9_-]+$/.test(plugin)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's good idea to DRY this RegExp?

@slackr
Copy link
Contributor

slackr commented Dec 5, 2019

fyi, this was assigned CVE-2019-19609

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

source: core:admin Source is core/admin package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants