Remove IdSchema validation

RESOLVED FIXED in FxOS-S8 (02Oct)

Status

Firefox OS
Sync
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: michielbdejong, Assigned: michielbdejong)

Tracking

(Blocks: 2 bugs)

unspecified
FxOS-S8 (02Oct)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

2 years ago
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)

Updated

2 years ago
Assignee: nobody → mbdejong
Blocks: 1195647
(Assignee)

Updated

2 years ago
Blocks: 1202382

Comment 1

2 years ago
Created attachment 8668426 [details] [review]
[gaia] michielbdejong:1209906-special-fxsync-ids > mozilla-b2g:master
(Assignee)

Updated

2 years ago
Attachment #8668426 - Flags: review?(ferjmoreno)
Blocks: 824026
Target Milestone: --- → FxOS-S8 (02Oct)
(Assignee)

Comment 2

2 years ago
(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.
(Assignee)

Updated

2 years ago
Summary: Handle special FxSync id's in bookmarks IdSchema → Remove IdSchema validation
(Assignee)

Comment 4

2 years ago
OK, I'll remove IdSchema validation altogether. Maybe just check that it's a String.
Attachment #8668426 - Flags: review?(ferjmoreno)
(Assignee)

Updated

2 years ago
Attachment #8668426 - Flags: review?(ferjmoreno)
(Assignee)

Comment 5

2 years ago
Comment on attachment 8668426 [details] [review]
[gaia] michielbdejong:1209906-special-fxsync-ids > mozilla-b2g:master

Sorry, wrong branch.
Attachment #8668426 - Flags: review?(ferjmoreno) → review-
(Assignee)

Comment 6

2 years ago
Created attachment 8668888 [details] [review]
[gaia] michielbdejong:1209906-remove-IdSchema-checks > mozilla-b2g:master

Manually creating attachment (hope this works)
Attachment #8668426 - Attachment is obsolete: true
Attachment #8668888 - Flags: review?(ferjmoreno)
(Assignee)

Comment 7

2 years ago
Comment on attachment 8668888 [details] [review]
[gaia] michielbdejong:1209906-remove-IdSchema-checks > mozilla-b2g:master

https://github.com/mozilla-b2g/gaia/pull/32197
(Assignee)

Comment 8

2 years ago
Created attachment 8668889 [details] [review]
[gaia] michielbdejong:1209906-remove-IdSchema-checks > mozilla-b2g:master
Attachment #8668888 - Attachment is obsolete: true
Attachment #8668888 - Flags: review?(ferjmoreno)
Attachment #8668889 - Flags: review?(ferjmoreno)
https://github.com/mozilla-b2g/gaia/commit/944b337e84685a15e75c370b144cb094c0491604
Status: NEW → RESOLVED
Last Resolved: 2 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.