base dashboard and login
This commit is contained in:
@@ -328,8 +328,9 @@ func (c *CLIClient) listHubItems(ctx context.Context, kind string) ([]HubItem, e
|
||||
}
|
||||
|
||||
func (c *CLIClient) hubAction(ctx context.Context, kind, action, name string) error {
|
||||
if err := validateName(name); err != nil {
|
||||
return err
|
||||
// Hub item names can contain slashes (e.g. crowdsecurity/ssh-bf); use safeArg not validateName.
|
||||
if !safeArg.MatchString(name) || name == "" {
|
||||
return fmt.Errorf("invalid hub item name: %q", name)
|
||||
}
|
||||
_, err := c.run(ctx, kind, action, name)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user