Fix vulnerability in identifier for extension configuration (#10090) * PR https://github.com/flutter/devtools/pull/9981 added the `identifier` getter to `DevToolsExtensionConfig`, which built it based on the `packageName`, `name`, and `version`, separated by underscores. This makes it vulnerable if package names contain underscores. ``` String get identifier => packageName == displayName ? '${displayName}_$version' : '${packageName}_${displayName}_$version'; ``` If a legitimate extension belongs to package device_preview (with name: device_preview and version: 1.0.0), its `packageName == displayName` branch produces: `device_preview_1.0.0` An attacker can publish a package named device and set `name: preview`and `version: 1.0.0`in its config.yaml, and because `packageName != displayName`, it takes the second branch (`${packageName}_${displayName}_$version`), which also produces: device_preview_1.0.0. This change uses a hyphen between `packageName` and `displayName` and validates that the name and version are valid. * Address code review comments * Update NEXT_RELEASE_NOTES.md * release notes formatting
Dart & Flutter DevTools is a suite of performance tools for Dart and Flutter.
For documentation on installing and trying out DevTools, please see our docs.
Contributions welcome! See our contributing page for an overview of how to build and contribute to the project.
By using Dart DevTools, you agree to the Google Terms of Service. To understand how we use data collected from this service, see the Google Privacy Policy.