Commit Graph

317 Commits

Author SHA1 Message Date
Wade Tregaskis
bc15440ded Now set the correct base URL for each article's webview, and now load app JavaScripts as WebKit "user" scripts.
Setting the real base URL (rather than using a file URL pointing to the app's Resources folder) allows relative URLs to work correctly within the article, such as for images, and is compatible with Cross-Site-Origin policies that restrict use of resources outside of the origin domain.

It also implicitly eliminates access to the local file system from within the webview, as the use of a non-file base URL makes WebKit treats the webview's content as being from a remote server, and its default security policy is to then disallow local file access (except with explicit user action, such as drag-and-drop or via an `input` form element).

Note: the base URL is currently typically taken from the feed itself (specifically the "link" feed (channel) metadata).  That is controlled by the feed author (or a man-in-the-middle attacker).  It should perhaps be validated to ensure it's actually an HTTP/HTTPS URL, to prevent security problems.

The app-specific JavaScripts - used for fixing styling issues and the like - are now formally loaded as extensions to the web page, "user scripts" in WebKit parlance.  They're isolated to their own JavaScript world - meaning they can't be seen or manipulated by JavaScript from the feed article itself, and are more secure as a result.

Fixes #4156.

Co-Authored-By: Brent Simmons <1297121+brentsimmons@users.noreply.github.com>
2023-11-22 13:47:54 -08:00
Brent Simmons
7556428c29 Rename user-facing New Web Feed text to just New Feed. 2023-07-02 15:03:31 -07:00
Brent Simmons
942ad6bd49 Continue removing Reddit references. 2023-06-30 21:28:07 -07:00
Stuart Breckenridge
8bf0744d3b Correct description 2023-06-04 18:59:42 +08:00
Stuart Breckenridge
f1446856e3 Adds Simplified Chinese translations 2023-06-04 18:58:14 +08:00
Stuart Breckenridge
e9fed8ddc1 Internationalises notificationDisplayName
& provides en, en-gb strings; simplified chinese pending
2023-06-04 18:32:28 +08:00
Jerry
8f4ee68b91 Update Simplified Chinese localization 2023-05-30 09:17:33 +08:00
Jerry
89eeb94024 Create Simplified Chinese locales 2023-05-28 14:22:55 +08:00
Stuart Breckenridge
ed6ff090be Merge branch 'ios-ui-settings-localised' into localize_strings
# Conflicts:
#	Mac/AppDelegate.swift
#	Mac/Base.lproj/Preferences.storyboard
#	NetNewsWire.xcodeproj/project.pbxproj
#	Shared/Localizations/LocalizedNetNewsWireError.swift
#	iOS/MasterFeed/MasterFeedViewController.swift
#	iOS/Settings/Appearance/ArticleThemeManagerView.swift
#	iOS/Settings/Appearance/DisplayAndBehaviorsView.swift
#	iOS/Settings/General/SettingsView.swift
2023-05-27 17:00:42 +08:00
Stuart Breckenridge
60b6a47c48 Merge branch 'main' into ios-ui-settings-localised
# Conflicts:
#	iOS/Settings/Settings.storyboard
#	iOS/Settings/SettingsViewController.swift
2023-03-14 12:27:56 +08:00
Maurice Parker
11ff4b500f Make the About View use the actual application icon instead of a copy of the old icon 2023-03-11 20:07:06 -06:00
Stuart Breckenridge
6462264fde Localization files updated 2023-02-10 09:51:12 +08:00
Stuart Breckenridge
6efed337db Merge branch 'main' into localize_strings
# Conflicts:
#	Mac/MainWindow/AddFeed/AddTwitterFeedWindowController.swift
#	Mac/MainWindow/MainWindowController.swift
#	NetNewsWire.xcodeproj/project.pbxproj
#	Shared/ArticleStyles/ArticleTheme.swift
#	iOS/Add/AddFeedViewController.swift
#	iOS/Add/Twitter/TwitterEnterDetailTableViewController.swift
#	iOS/Article/ArticleViewController.swift
#	iOS/MasterFeed/MasterFeedViewController.swift
2023-02-10 09:26:05 +08:00
Stuart Breckenridge
3e9bc42df9 Merge branch 'main' into ios-ui-settings-localised
# Conflicts:
#	NetNewsWire.xcodeproj/project.pbxproj
#	Shared/Timer/AccountRefreshTimer.swift
#	iOS/Account/ReaderAPIAccountViewController.swift
2023-02-09 10:05:18 +08:00
Maurice Parker
724ac6e216 Merge branch 'ios-release' 2023-02-04 13:43:55 -07:00
Maurice Parker
6169df75cc Update the iOS icons. The 1x icons were not updated as they aren't used any longer. 2023-02-03 19:59:26 -08:00
Maurice Parker
36822a77d0 Remove Twitter integration. Fixes #3842 2023-02-03 19:11:33 -08:00
Stuart Breckenridge
b62dcf8d29 Adds localization technote
And a missing translation
2023-01-08 06:35:22 +08:00
Stuart Breckenridge
432c0c9f25 Adds missing translations 2023-01-04 19:17:48 +08:00
Stuart Breckenridge
fbba9d4339 Merge branch 'main' into localize_strings
# Conflicts:
#	Shared/Timer/AccountRefreshTimer.swift
2023-01-04 15:17:14 +08:00
Stuart Breckenridge
9a03ce61b2 Adds en-gb localisation 2023-01-04 12:42:23 +08:00
Stuart Breckenridge
9347458abf Add en-GB localisation 2023-01-04 12:42:13 +08:00
Stuart Breckenridge
e670d610e3 Localized mac app 2023-01-04 12:33:38 +08:00
Stuart Breckenridge
2bca08195e Localization work 2022-12-30 21:53:07 +08:00
Stuart Breckenridge
b526f05e68 All iOS Inspectors are now SwiftUI 2022-12-15 21:12:37 +08:00
Stuart Breckenridge
ad66d7072c Multiple revisions
Accounts

- Manage Accounts title updated to “Manage Accounts”
- Swift left to delete account added (with confirmation alert)
- After adding an account, user is returned to the Manage Accounts view
- Done button added to the Add Account view

Extensions

- Plus button added
- Consistent UI with Add Account
- Swipe left to deactivate added (with confirmation alert)

Import / Export

- Converted to two separate cells, with action sheet
2022-12-13 09:14:03 +08:00
Maurice Parker
90101274b4 Add the title parameter to shortcut. Fixes #3697 2022-12-12 17:02:51 -07:00
Stuart Breckenridge
36fa87b8c4 More Options Added to Settings 2022-11-29 19:12:44 +08:00
Stuart Breckenridge
9fc6c54222 Adds early work on managing appearance 2022-11-12 23:10:30 +08:00
Stuart Breckenridge
bb49e744ae simplifies Settings options 2022-11-12 21:35:59 +08:00
Stuart Breckenridge
05aca1c995 About Views
- Tidied up iOS
- Adds refreshed About view to macOS 12+
- About.plist is now shared
2022-10-03 21:16:51 +08:00
Stuart Breckenridge
58d480f4a4 Refreshes the About screen on iOS 2022-10-02 17:28:19 +08:00
Maurice Parker
eb25e01be5 Update the "Mark as" icons. Fixes #3687 2022-09-24 14:24:32 -05:00
Maurice Parker
d2db39c716 Remove FeedWrangler account code 2022-06-04 17:23:20 -07:00
Stuart Breckenridge
ac8fdabb3e Removes 1Password 2022-01-25 06:07:33 +08:00
Brent Simmons
9d41e8eec2 Make app owner of its document type. Bump build to 6102. 2022-01-23 21:03:04 -08:00
Maurice Parker
7a2ddd7f06 Add ITSAppUsesNonExemptEncryption key 2021-12-30 12:04:02 -08:00
Maurice Parker
ab9802d8b5 Remove Hyperlegible theme 2021-12-30 11:55:44 -08:00
Brian Sanders
a731397486 Fixes #2369: Video playback is reset on rotation
The viewWillTransition(to:with:) method in WebViewController was introduced to
fix #3041, so I added an alternative solution using a resize handler in JS.
2021-12-04 18:43:53 -05:00
Maurice Parker
c16a231530 Added the Hyperlegible theme 2021-11-01 21:22:22 -05:00
Maurice Parker
3fdb4a94ae Move Sepia theme to correct location and clean up the header links 2021-09-15 04:16:35 -05:00
Maurice Parker
1eedc22149 Fix warning about opening files in place 2021-09-12 15:49:12 -05:00
Maurice Parker
9851629ec9 Implement a way to distribute themes with NetNewsWire 2021-09-12 11:53:34 -05:00
Maurice Parker
b568f03edc Unify the stylesheets into a single one to make building themes easier 2021-09-08 04:58:26 -05:00
Maurice Parker
491896e334 Change theme file extension from nnwstyle to nnwtheme 2021-09-07 17:06:41 -05:00
Maurice Parker
cfd2db58c5 Remove references to nnwstyle.icns so that the system will generate a document icon for us. 2021-09-07 14:31:33 -05:00
Maurice Parker
45c47f3752 Add nnwstyle as an imported type 2021-09-06 20:29:40 -05:00
Maurice Parker
285e9a40fa Merge pull request #3262 from stuartbreckenridge/ios-browser-behaviour
Adds option to open article links in NetNewsWire or in the default browser.
2021-08-26 17:48:30 -05:00
Stuart Breckenridge
94624cecf4 Changes
Info.plist - removes unused query schemes

Settings.storyboard
- changes accentColor to primaryAccentColor
- fixes leading constraint on label
2021-08-27 06:21:51 +08:00
Stuart Breckenridge
2b6bd40179 Update Credits.rtf 2021-08-26 19:23:02 +08:00