Closed Bug 1368703 Opened 7 years ago Closed 7 years ago

[Shield][Control Center] - Trim Slug/ Slug branches left/right

Categories

(Shield :: General, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aflorinescu, Assigned: osmose)

References

Details

[Description:]
The values for Slug/slug branches allow extra spacing at start/end. The values are saved with the blank spaces.

[Preconditions]
You need access to Admin interface (for this Test Suite, https://normandy-admin.stage.mozaws.net/control
1. Obtain a copy of Firefox with the SHIELD recipe client system add-on installed. You can check about:support to ensure that you have it.
2. Set the extensions.shield-recipe-client.dev_mode preference to true to run recipes immediately on startup.
3. Set the extensions.shield-recipe-client.logging.level preference to 0 to enable more logging.
4. Set the security.content.signature.root_hash preference to DB:74:CE:58:E4:F9:D0:9E:E0:42:36:BE:6C:C5:C4:F6:6A:E7:74:7D:C0:21:42:7A:03:BC:2F:57:0C:8B:9B:90.
5. Set the preference value for extensions.shield-recipe-client.api_url set to https://normandy.stage.mozaws.net/api/v1


[Steps:]
1. Create a new recipe  - action configuration: preference experiment
2. For Slug value input: " test "
3. For Experiment branches input branch slugs: " test1 ".
4. Save Experiment recipe.

[Actual Result:]
The values for the Slug/Branch Slug are saved with the extra blank spaces.

[Expected Result:]
Upon validation/save trim the values left and right.
Assignee: nobody → mkelly
Commits pushed to master at https://github.com/mozilla/normandy

https://github.com/mozilla/normandy/commit/4283e80076881a3d1bcca481a834ea52d92ac882
Fix bug 1368703: Validate preference experiment slugs.

If we wanted to auto-trim slugs, we'd want to do it server-side to
avoid issues with other clients submitting non-compliant slugs. We don't
yet have a good solution for server-side transformations on a per-action
basis. To avoid addressing that large issue, for now we can just validate
the slugs going forward. Long-term we'll want to address per-action
customization in a better way.

https://github.com/mozilla/normandy/commit/6057ec405925d839fd32e22bfeedfbcc0164890a
Merge pull request #827 from Osmose/prefexp-slug-validation

Fix bug 1368703: Validate preference experiment slugs.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.