Closed Bug 1209906 Opened 9 years ago Closed 9 years ago

Remove IdSchema validation

Categories

(Firefox OS Graveyard :: Sync, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
FxOS-S8 (02Oct)

People

(Reporter: mbdejong, Assigned: mbdejong)

References

Details

Attachments

(1 file, 2 obsolete files)

Normally, FxSync id's are 9-character (12-byte) URL-safe Base64 strings, but in the bookmarks collection, there are some special id's (currently there are four, 'menu', 'toolbar', 'mobile', and 'unfiled'). The FxSyncIdSchema in SyncEngine should be configurable to deal with this.
Assignee: nobody → mbdejong
Blocks: 1195647
Blocks: 1202382
Attachment #8668426 - Flags: review?(ferjmoreno)
Blocks: fxos-sync
Target Milestone: --- → FxOS-S8 (02Oct)
(In reply to Michiel de Jong [:michielbdejong] from comment #0) > Normally, FxSync id's are 9-character (12-byte) URL-safe Base64 strings, but > in the bookmarks collection, there are some special id's (currently there > are four, 'menu', 'toolbar', 'mobile', and 'unfiled'). > > The FxSyncIdSchema in SyncEngine should be configurable to deal with this. The full list is actually: public static final String MOBILE_FOLDER_GUID = "mobile"; public static final String PLACES_FOLDER_GUID = "places"; public static final String MENU_FOLDER_GUID = "menu"; public static final String TAGS_FOLDER_GUID = "tags"; public static final String TOOLBAR_FOLDER_GUID = "toolbar"; public static final String UNFILED_FOLDER_GUID = "unfiled"; public static final String FAKE_DESKTOP_FOLDER_GUID = "desktop"; public static final String PINNED_FOLDER_GUID = "pinned"; (from mobile/android/base/db/BrowserContract.java)
(In reply to Michiel de Jong [:michielbdejong] from comment #2) > (In reply to Michiel de Jong [:michielbdejong] from comment #0) > > Normally, FxSync id's are 9-character (12-byte) URL-safe Base64 strings, but > > in the bookmarks collection, there are some special id's (currently there > > are four, 'menu', 'toolbar', 'mobile', and 'unfiled'). > > > > The FxSyncIdSchema in SyncEngine should be configurable to deal with this. > > The full list is actually: > public static final String MOBILE_FOLDER_GUID = "mobile"; > public static final String PLACES_FOLDER_GUID = "places"; > public static final String MENU_FOLDER_GUID = "menu"; > public static final String TAGS_FOLDER_GUID = "tags"; > public static final String TOOLBAR_FOLDER_GUID = "toolbar"; > public static final String UNFILED_FOLDER_GUID = "unfiled"; > public static final String FAKE_DESKTOP_FOLDER_GUID = "desktop"; > public static final String PINNED_FOLDER_GUID = "pinned"; > > (from mobile/android/base/db/BrowserContract.java) I am thinking if FxSync adds a new special ID before we realize that and fix it, SyncEngine will throw errors for the invalid/unknown ID. When FxSync feature is in FxOS, that will be an issue that we have to catch up the changes of these special IDs and impact FxSync users in FxOS. This issue lets me consider the necessary of validating ID.
Summary: Handle special FxSync id's in bookmarks IdSchema → Remove IdSchema validation
OK, I'll remove IdSchema validation altogether. Maybe just check that it's a String.
Attachment #8668426 - Flags: review?(ferjmoreno)
Attachment #8668426 - Flags: review?(ferjmoreno)
Comment on attachment 8668426 [details] [review] [gaia] michielbdejong:1209906-special-fxsync-ids > mozilla-b2g:master Sorry, wrong branch.
Attachment #8668426 - Flags: review?(ferjmoreno) → review-
Manually creating attachment (hope this works)
Attachment #8668426 - Attachment is obsolete: true
Attachment #8668888 - Flags: review?(ferjmoreno)
Comment on attachment 8668888 [details] [review] [gaia] michielbdejong:1209906-remove-IdSchema-checks > mozilla-b2g:master https://github.com/mozilla-b2g/gaia/pull/32197
Attachment #8668888 - Attachment is obsolete: true
Attachment #8668888 - Flags: review?(ferjmoreno)
Attachment #8668889 - Flags: review?(ferjmoreno)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Attachment #8668889 - Flags: review?(ferjmoreno) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: