-
Notifications
You must be signed in to change notification settings - Fork 440
Conversation
41682be
to
538a4da
Compare
5a0318a
to
20fd26f
Compare
a5d7b1b
to
a65b20d
Compare
446dd35
to
a845929
Compare
8b7801e
to
9613cca
Compare
Fetch limit is changed to 200
…that it fetches last month only
d643b01
to
1779d08
Compare
return | ||
} | ||
|
||
let historyNode = HistoryNode(url: url, title: title, dateAdded: dateAdded) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soner-yuksel - iOS supports special URLs and external URLs as well. about:
| mailto:
and tel:
URLs. Do you know if these URLs are filtered before adding to the sync chain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the condition of the where the add
is used is not changed. Only how we add is changed in this context.
History add
is used inside func navigateInTab(tab: Tab, to navigation: WKNavigation? = nil)
And the conditions are
if !url.isErrorPageURL, !url.isAboutHomeURL, !url.isFileURL
if !url.isErrorPageURL, !url.isAboutHomeURL, !url.isFileURL { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I think we should add externalURL
to this list. I can file a follow-up issue for that? Let me know if you disagree.
The security review is ongoing. Merging this to unblock feature core requirements. If any issue arose in security review there will be upcoming Pull Request. |
var title: String? | ||
var message: String? | ||
var removeButtonName: String? | ||
let deviceName = device.name ?? Strings.syncRemoveDeviceDefaultName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soner-yuksel - do you know if the device-name
is sanitized before presenting in UI? I've come across cases where <script>
tags in device name causes script execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an existing method which was moved in the file from previous position.
However the device_name is not a user entry field, it is fetched using BraveSyncAPI
and underneath this information is fetched from DeviceInfoSyncServiceFactory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified that the device-name
is not sanitized. I wasn't able to cause an injection, but as a defense in depth strategy what do you think about encoding the string before printing out the device name.
Summary of Changes
This Pull Request contains
History Migration:
We are adding history brave-core migration to our existing migrator used for bookmarks and making both of the sync types work together and handle error cases related for both of the types. So in future the new sync types can also use same migrator.
History Fetch/Add/Delete/Remove with Core and Sync
A new HistoryFetcher is created where we perform the fetch from brave-core and various utility methods are created over the data. This fetcher is using Ordered Dictionary so in order to use this we added Swift Collections package. Believe the utility brought with Swift Collections will also be useful for the rest of the application. https://swift.org/blog/swift-collections/
In addition old add delete methods are replaced with brave-core functionality.
Sync Profile
Enable/Disable different Sync Types is added. Sync Settings will contain a new section which will allow user to toggle different Sync types according to users preference. This is using BraveSyncProfileService and it will also help when new sync types are added to give user ability to turn them on/off.
This pull request fixes #3227
This pull request fixes #3723
This pull request fixes #3721
This pull request fixes #3869
This pull request fixes #3591
Brave Core PR is merged and uplifted to 1.26.x and in addition this PR also handles the changes made in core to align history and bookmarks code.
Core PR For History Sync: brave/brave-core#8869
Core PR For alignment: brave/brave-core#9145
SecReview: https://github.com/brave/security/issues/501
Submitter Checklist:
NSLocalizableString()
Test Plan:
Test Migration: The test cases and conditions are same with bookmark. Try migration 3 times but for both history and bookmarks together in this case.
Normal Add / Delete / Delete All
Test Sync: Same testing cases with bookmarks release but this time after joining to sync chain can actually turn on/off
which type of sync should be enabled
Screenshots:
Reviewer Checklist:
QA/(Yes|No)
release-notes/(include|exclude)
bug
/enhancement