diff --git a/CHANGELOG.md b/CHANGELOG.md index b8612ce1..767bff55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ Release date: TBD #### Windows - Set "app start on login" preference to default on and synchronize its state with config.json. [#846](https://github.com/mattermost/desktop/pull/846) + - Removed the ability to open UNC path and file:// links. + [#881](https://github.com/mattermost/desktop/pull/881) #### Mac - Add **.dmg** package to support installation. @@ -38,6 +40,8 @@ Release date: TBD [#818](https://github.com/mattermost/desktop/pull/818) - Set "app start on login" preference to default on and synchronize its state with config.json. [#846](https://github.com/mattermost/desktop/pull/846) + - Added AppImage packages as unofficial build + [#864](https://github.com/mattermost/desktop/pull/864) ### Architectural Changes - Major version upgrade of Electron to v2.0.8. Electron is the underlying technology used to build the Desktop apps. diff --git a/electron-builder.json b/electron-builder.json index ec0aae76..f17cf50f 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -30,7 +30,8 @@ "category": "Network;InstantMessaging", "target": [ "deb", - "tar.gz" + "tar.gz", + "appimage" ], "extraFiles": [ { diff --git a/scripts/cp_artifacts.sh b/scripts/cp_artifacts.sh index e748a294..e62b880d 100644 --- a/scripts/cp_artifacts.sh +++ b/scripts/cp_artifacts.sh @@ -11,4 +11,5 @@ cp "${SRC}/mattermost-desktop-setup-${VERSION}-win.exe" "${DEST}/" cp "${SRC}"/mattermost-desktop-*.zip "${DEST}/" cp "${SRC}"/*.tar.gz "${DEST}/" cp "${SRC}"/*.deb "${DEST}/" +cp "${SRC}"/*.AppImage "${DEST}/" cp "${SRC}"/*.yml "${DEST}/" diff --git a/src/browser/components/MattermostView.jsx b/src/browser/components/MattermostView.jsx index 74b987cb..9167c3e5 100644 --- a/src/browser/components/MattermostView.jsx +++ b/src/browser/components/MattermostView.jsx @@ -22,25 +22,6 @@ const preloadJS = `file://${remote.app.getAppPath()}/browser/webview/mattermost_ const ERR_NOT_IMPLEMENTED = -11; const U2F_EXTENSION_URL = 'chrome-extension://kmendfapggjehodndflmmgagdbamhnfd/u2f-comms.html'; -function extractFileURL(message) { - const matched = message.match(/Not allowed to load local resource:\s*(.+)/); - if (matched) { - return matched[1]; - } - return ''; -} - -function isNetworkDrive(fileURL) { - const u = url.parse(fileURL); - if (u.protocol === 'file:' && u.host) { - // Disallow localhost, 127.0.0.1, ::1. - if (!u.host.match(/^localhost$|^127\.0\.0\.1$|^\[::1\]$/)) { - return true; - } - } - return false; -} - export default class MattermostView extends React.Component { constructor(props) { super(props); @@ -191,19 +172,9 @@ export default class MattermostView extends React.Component { case 1: console.warn(message); break; - case 2: { - const fileURL = extractFileURL(e.message); - if (isNetworkDrive(fileURL)) { - // Network drive: Should be allowed. - if (!shell.openExternal(decodeURI(fileURL))) { - console.log(`[${this.props.name}] shell.openExternal failed: ${fileURL}`); - } - } else { - // Local drive such as 'C:\Windows': Should not be allowed. - console.error(message); - } + case 2: + console.error(message); break; - } default: console.log(message); break;