-
Notifications
You must be signed in to change notification settings - Fork 14
feat: WIP! EWM-497 #882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
feat: WIP! EWM-497 #882
Changes from 103 commits
Commits
Show all changes
110 commits
Select commit
Hold shift + click to select a range
72f4990
BrowserManager
knightsforce f1b9b02
FaviconManager
knightsforce b3a1d70
HistoryManager
knightsforce 5ca8ef5
BrowserManager
knightsforce e66035a
BrowserService
knightsforce 6e7d8d4
Elementary BrowserBookmarkBottomSheet
knightsforce 79bd483
Elementary BrowserBookmarkRenameBottomSheet
knightsforce a3548c1
Elementary BookmarksScreen
knightsforce 25c25a6
Remove browser_bookmarks_bloc.dart
knightsforce 31120ba
Remove browser_favicons_bloc.dart
knightsforce 2f72473
Elementary HistoryScreen
knightsforce 94c3618
Remove old import
knightsforce 919840f
Create BrowserTabsScreen
knightsforce 0f86c6a
Browser logic beta
knightsforce 6bae455
Fixes
knightsforce 2697404
feat: browser tabs (#808)
knightsforce 3bda1a1
fix: Clear storage (#713)
knightsforce 3afe03e
EWM-453. Clear cache assets if manifestUrl not exist (#716)
knightsforce 2476de3
refactor: EWM-444, EWM-439 (#730)
Odrin 5a2af41
fix: ms deployment fee; contract version check; (#786)
Odrin c66c0f4
fix(SPARX-CK): dont throw exception if cache is null; + improve log (…
Odrin cd88275
feat: update nekoton_repository to 0.56.0 and add currency decimals f…
Odrin ac52f09
BootstrapFailedRerunView contact us button (#743)
knightsforce 62d8fcc
refactor: EWM-424. TokenWalletOrdinaryTransactionDetails on Elementar…
knightsforce f079233
refactor: EWM-421. NewAccountScreen Elementary (#737)
knightsforce a1a069d
chore: merge fix
a41e7da
refactor: simplify & unify widget model factory initialization
6f5867d
refactor: Ewm 446 ton wallet multisig expired transaction details pag…
knightsforce d10041d
refactor: update TonWalletMultisigExpiredTransactionWidget constructo…
a95c264
feat: Browser modals (#816)
knightsforce 79605a0
Fix bottom navigation size
knightsforce abd9d8e
feat(EWM-484): add wallet V3R1/V3R2 support
f92622a
fix(EWM-485): add account and public key null checks in inpage provid…
df5f04a
Update bookmark bottomsheet
knightsforce 1e03aa1
Remove not used code
knightsforce 91f96a6
setClipBoardData
knightsforce 846e0d0
fix(EWM-488): wait for network switch; refactor service import/export;
a3d6d3e
Merge branch 'refs/heads/predev' into feat/browser
knightsforce 6029e8f
After merge
knightsforce f4cd71e
Handle App links in BrowserService
knightsforce 2a81195
Feat/browser tab animate (#817)
knightsforce 6d7d7f2
Browser loading favicon
knightsforce 9dc2253
fetchFavicon -> getFavicon
knightsforce 801b83b
Replace FaviconData on HashMap
knightsforce c37c736
Past nad go
knightsforce e7a0ab3
tooltip.svg
knightsforce 392b656
fix: browser fixes (#831)
knightsforce 8463470
fix: browser fixes2 (#835)
knightsforce c6127a3
EWM-501 fix undo (#837)
knightsforce 6466591
Center past outside PastGoButton widget
knightsforce 3f1fb88
BrowserManagerScreenshotHelper -> BrowserManagerScreenShooter
knightsforce 94bdf4e
BrowserPageWidget rename WebView methods and add comments
knightsforce 453ab23
BrowserPageScrollDelegate
knightsforce a0c2ced
TabMenuDelegate
knightsforce f6bc960
BrowserPastGoDelegate
knightsforce a291b62
PageSlideDelegate
knightsforce 9d66f81
PstGoDelegate move notifier inside
knightsforce 3c2c66a
BrowserSizesDelegate
knightsforce 13c9e95
BrowserKeysDelegate
knightsforce 9505ad6
MenuAnimationDelegate
knightsforce 4c67cbc
MenuAnimationDelegate rename to BrowserMenuAnimationDelegate
knightsforce 1950c8b
BrowserProgressIndicatorDelegate
knightsforce ac365d5
BrowserTabsDelegate
knightsforce 887f33e
Browser delegate add ui interface
knightsforce 01df710
Merge branch 'refs/heads/dev' into feat/browser
knightsforce d9eca64
After merge
knightsforce 1cfe8c4
Move MessengerService into domain
knightsforce 03528a7
Browser. Fix slideTo
knightsforce 14fd2f4
Browser. resetVerticalScroll
knightsforce 9a507da
Browser. Wrap search text in Flexible
knightsforce 6ba30f3
Browser. BrowserTabsDelegate onUpdateActiveTab Future wrapper
knightsforce ef6884b
Browser. Update BrowserMenuBackgroundBlur for impeller
knightsforce 0f89ee9
Browser. UrlValidator
knightsforce 844a14e
Browser. Remove _handleUrl
knightsforce e0738c5
Browser. UrlValidator test
knightsforce 6cdd68f
Browser. Move take screenshot callback to BrowserPageWidgetModel
knightsforce 4c40c7a
Browser. DimensSizeV2.d207
knightsforce a5b4098
Browser. BrowserBookmarksStorageService clear use tryWrapper and log
knightsforce 848957a
fix: Browser. Page padding (#851)
knightsforce e53a914
Browser. Use diff pointer for check scroll page
knightsforce 2087577
Browser. typedef ImageCache
knightsforce fc7a57c
Browser. Refactor FaviconManager
knightsforce b64c364
Browser. HistoryManager remove sort
knightsforce 827e8d8
Browser. PermissionsManager using ValueStream
knightsforce 7a15a08
Merge branch 'refs/heads/dev' into feat/browser
knightsforce 969c9fa
After merge
knightsforce 9990c4b
fix: browser fixes (#863)
knightsforce ec1ba7c
fix: browser fixes menu (#866)
knightsforce 474c3d8
Merge branch 'refs/heads/dev' into feat/browser
knightsforce 4688fd0
fix: browser fixes 3 (#868)
knightsforce b4b12f6
Merge branch 'refs/heads/dev' into feat/browser
knightsforce 7ec422f
Browser. After merge
knightsforce 59ab7a8
EWM-497. Anti phishing logic
knightsforce 20c03a4
EWM-497. BrowserPage refactor widget.some fields
knightsforce f196819
EWM-497. Ci update blacklists
knightsforce 08b0d32
Merge branch 'refs/heads/dev' into EWM-497
knightsforce e9ed123
EWM-497. After analyze
knightsforce e260ac8
EWM-497. actions/upload-artifact v4
knightsforce f47d1d3
EWM-497. Flutter 3.29.3
knightsforce 71b428c
EWM-497. Update fetch anti-phishing lists
knightsforce e19c49c
EWM-497. Temp Download anti-phishing file
knightsforce 3dc14c3
EWM-497. Touch asset to bump timestamp
knightsforce 0b737fb
EWM-497. Refresh Flutter assets manifest
knightsforce 5bce71c
Merge branch 'dev' into EWM-497
Odrin c366d61
Merge branch 'refs/heads/dev' into EWM-497
knightsforce 994e50c
refactor/EWM-497: anti_phishing logic
knightsforce e364ab7
refactor/EWM-497: clean cache for use new anti_phishing file
knightsforce fe173cb
refactor/EWM-497: check link pattern
knightsforce 322e5ce
refactor/EWM-497: Add Create Release yaml
knightsforce ea9e2f8
refactor/EWM-497: rename to Create release brunch
knightsforce File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.29.2 | ||
| 3.29.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "blacklist": [ | ||
| "everscan.com", | ||
| "octsubridge.io", | ||
| "octus-bridge.com", | ||
| "protocoloctusbridge.com", | ||
| "octlusbridge.com", | ||
| "bridge-octus.org", | ||
| "internal-meeting.online", | ||
| "pancake-ever.com", | ||
| "gravixguard.github.io", | ||
| "gravixguard.web.app", | ||
| "broxus.net", | ||
| "chainconnect.app" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
| <title>SparX Wallet Phishing Detection</title> | ||
| <style> | ||
| body { | ||
| margin: 0; | ||
| padding: 20px; | ||
| background-color: #f0f0f0; | ||
| font-family: Arial, sans-serif; | ||
| color: #333; | ||
| } | ||
| .container { | ||
| max-width: 800px; | ||
| margin: 0 auto; | ||
| background-color: #fff; | ||
| border-radius: 4px; | ||
| box-shadow: 0 2px 6px rgba(0,0,0,0.1); | ||
| padding: 24px; | ||
| } | ||
| h1 { | ||
| margin-top: 0; | ||
| font-size: 1.8rem; | ||
| } | ||
| p { | ||
| line-height: 1.6; | ||
| margin-bottom: 1em; | ||
| } | ||
| a { | ||
| color: #0066cc; | ||
| text-decoration: none; | ||
| } | ||
| a:hover { | ||
| text-decoration: underline; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <div class="container"> | ||
| <h1>SparX Wallet Phishing Detection</h1> | ||
| <p> | ||
| This domain is currently on the SparX Wallet domain warning list. This means | ||
| that based on information available to us, SparX Wallet believes this domain | ||
| could currently compromise your security and, as an added safety feature, | ||
| SparX Wallet has restricted access to the site. To override this, please read | ||
| the rest of this warning for instructions on how to continue at your own risk. | ||
| </p> | ||
| <p> | ||
| There are many reasons sites can appear on our warning list, and our warning | ||
| list compiles from other widely used industry lists. Such reasons can include | ||
| known fraud or security risks, such as domains that test positive on the | ||
| SparX Wallet Phishing Detection. Domains on these warning lists may include | ||
| outright malicious websites and legitimate websites that have been compromised | ||
| by a malicious actor. | ||
| </p> | ||
| <p> | ||
| To read more about this site please | ||
| <a href="https://cryptoscamdb.org/search"> | ||
| search for the domain on CryptoScamDB | ||
| </a>. | ||
| </p> | ||
| <p> | ||
| Note that this warning list is compiled on a voluntary basis. This list may be | ||
| inaccurate or incomplete. Just because a domain does not appear on this list is | ||
| not an implicit guarantee of that domain's safety. As always, your transactions | ||
| are your own responsibility. If you wish to interact with any domain on our | ||
| warning list, you can do so by | ||
| <a href="{PHISHING_ORIGINAL_SITE}"> | ||
| continuing at your own risk | ||
| </a>. | ||
| </p> | ||
| </div> | ||
| </body> | ||
| </html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
lib/feature/browser_v2/managers/broser_anti_phishing_manager.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import 'dart:convert'; | ||
|
|
||
| import 'package:app/app/service/resources_service.dart'; | ||
| import 'package:app/utils/json/json.dart'; | ||
| import 'package:flutter/foundation.dart'; | ||
| import 'package:flutter/services.dart'; | ||
| import 'package:logging/logging.dart'; | ||
| import 'package:rxdart/rxdart.dart'; | ||
|
|
||
| class BrowserAntiPhishingManager { | ||
| BrowserAntiPhishingManager(this._resourcesService); | ||
|
|
||
| final _blackListSubj = BehaviorSubject<List<String>>.seeded([]); | ||
knightsforce marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| List<String> get blackList => _blackListSubj.value; | ||
|
|
||
| final ResourcesService _resourcesService; | ||
|
|
||
| final _log = Logger('BrowserAntiPhishingManager'); | ||
|
|
||
| Future<void> init() { | ||
| return loadLinksJson(); | ||
| } | ||
|
|
||
| void dispose() { | ||
| _blackListSubj.close(); | ||
| } | ||
|
|
||
| Future<void> loadLinksJson() async { | ||
| try { | ||
| final json = await _resourcesService.loadString( | ||
| 'assets/configs/anti_phishing.json', | ||
| ); | ||
|
|
||
| final map = await compute<String, Map<String, dynamic>>(_parse, json); | ||
|
|
||
| _blackListSubj.add(castJsonList(map['blacklist'])); | ||
| } catch (e, s) { | ||
| _log.severe('Load blacklist JSON error', e, s); | ||
| } | ||
| } | ||
|
|
||
| Future<String> getPhishingGuardHtml(String path) async { | ||
| final html = await rootBundle.loadString('assets/html/anti_phishing.html'); | ||
knightsforce marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| html.replaceFirst('{PHISHING_ORIGINAL_SITE}', path); | ||
| return html; | ||
| } | ||
|
|
||
| static Map<String, dynamic> _parse(String json) { | ||
| return jsonDecode(json) as Map<String, dynamic>; | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.