vscode-wpilib icon indicating copy to clipboard operation
vscode-wpilib copied to clipboard

Block special character for project name

Open WuYuanhun opened this issue 5 years ago • 4 comments

add special character validation for project name (issue #273 & #63)

WuYuanhun avatar Oct 15 '19 01:10 WuYuanhun

Does this only block it on the project name or also in the project path? There's also been instances of the later.

I think it's too restrictive. For example underscore and hyphens are blocked. It might be better to block known bad characters then whitelist a limited subset.

sciencewhiz avatar Oct 15 '19 17:10 sciencewhiz

Does this only block it on the project name or also in the project path? There's also been instances of the later.

I think it's too restrictive. For example underscore and hyphens are blocked. It might be better to block known bad characters then whitelist a limited subset.

Then We need to set up a blacklist.

The project name block strategies will be

  • string started with or ended with symbols are not allowed
  • string started with or ended with space are not allowed
  • string with blacklist character

The path block strategies will be

  • path with blacklist character
  • path with whitespace

WuYuanhun avatar Oct 16 '19 01:10 WuYuanhun

We can't block paths with white space too many users have a space in their username. The project name is the only one we need to block white space from

ThadHouse avatar Oct 16 '19 01:10 ThadHouse

We can't block paths with white space too many users have a space in their username

I see.

WuYuanhun avatar Oct 16 '19 05:10 WuYuanhun