Skip to content

Commit

Permalink
fix: regex vulnerable to super-linear runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Jan 10, 2024
1 parent 9c23bec commit c320bd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/dev-environment/dev-environment-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ export function getEnvTrackingInfo( slug: string ): Record< string, unknown > {
result[ snakeCasedKey ] = value;
}

result.php = ( result.php as string ).replace( /.*:/, '' );
result.php = ( result.php as string ).replace( /^[^:]+:/, '' );

return result;
} catch ( err ) {
Expand Down

0 comments on commit c320bd0

Please sign in to comment.