Skip to content

Commit de0baf8

Browse files
committed
now
1 parent ad627f9 commit de0baf8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pkg/connector/server_user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func (d *userPrincipalSyncer) Delete(ctx context.Context, resourceId *v2.Resourc
229229
if err != nil {
230230
return nil, err
231231
}
232-
return nil, err
232+
return nil, nil
233233
}
234234

235235
// generateStrongPassword creates a secure random password for SQL Server.

pkg/mssqldb/server.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ func (c *Client) GetServer(ctx context.Context) (*ServerModel, error) {
3636
}
3737

3838
func (c *Client) DisableUserFromServer(ctx context.Context, userName string) error {
39+
if strings.ContainsAny(userName, "[]\"';") {
40+
return fmt.Errorf("invalid characters in userName")
41+
}
42+
3943
query := fmt.Sprintf(`
4044
ALTER LOGIN [%s] DISABLE;`, userName)
4145

0 commit comments

Comments
 (0)