Allow any user id format
The user id / account UUID should allow any format as in some cases a regular user name could be used there.
This commit is contained in:
@@ -1173,42 +1173,6 @@ func TestSaveGetListSettingsValues(t *testing.T) {
|
||||
Status: "Internal Server Error",
|
||||
},
|
||||
},
|
||||
{
|
||||
testDataName: "../ in account uuid",
|
||||
SettingsValue: proto.SettingsValue{
|
||||
Identifier: &proto.Identifier{
|
||||
Extension: "great-extension",
|
||||
BundleKey: "bobs-bundle",
|
||||
AccountUuid: "../123e4567-e89b-12d3-a456-426652340000",
|
||||
SettingKey: "should-not-be-possible",
|
||||
},
|
||||
Value: &proto.SettingsValue_BoolValue{BoolValue: false},
|
||||
},
|
||||
expectedError: CustomError{
|
||||
ID: "go.micro.client",
|
||||
Code: 500,
|
||||
Detail: "account_uuid: must be a valid UUID.",
|
||||
Status: "Internal Server Error",
|
||||
},
|
||||
},
|
||||
{
|
||||
testDataName: "\\ in fields that are used to create folder and file names",
|
||||
SettingsValue: proto.SettingsValue{
|
||||
Identifier: &proto.Identifier{
|
||||
Extension: "\\-extension",
|
||||
BundleKey: "\\-bundle",
|
||||
AccountUuid: "\\123e4567-e89b-12d3-a456-426652340000",
|
||||
SettingKey: "should-not-be-possible",
|
||||
},
|
||||
Value: &proto.SettingsValue_BoolValue{BoolValue: false},
|
||||
},
|
||||
expectedError: CustomError{
|
||||
ID: "go.micro.client",
|
||||
Code: 500,
|
||||
Detail: "account_uuid: must be a valid UUID; bundle_key: must be in a valid format; extension: must be in a valid format.",
|
||||
Status: "Internal Server Error",
|
||||
},
|
||||
},
|
||||
}
|
||||
client := service.Client()
|
||||
cl := proto.NewValueService("com.owncloud.api.settings", client)
|
||||
|
||||
Reference in New Issue
Block a user