Skip to content

Commit

Permalink
Adding contentIsolation to the loginForm and removing the already dep…
Browse files Browse the repository at this point in the history
…recated/automated onlineCheckMethod config option (#1492)

* Adding contentIsolation to the loginForm and removing the already deprecated/automated onlineCheckMethod config option

* updating history.md file
  • Loading branch information
IsmaelMartinez authored Nov 25, 2024
1 parent e430d4b commit 4d87ad1
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 89 deletions.
10 changes: 6 additions & 4 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ For that reason, decided to refork it and fix a few things that where not workin

To be able to use a few github functionalities, it was decided to unfork the project [#87](https://github.com/IsmaelMartinez/teams-for-linux/issues/87).

The original idea was to let the project die when Microsoft would implement a desktop client for linux, as requested on the [Microsoft Suggestions Forum](https://microsoftteams.uservoice.com/forums/555103-public/suggestions/16911565-linux-client). Microsoft released a linux client on February 13, 2020 ([Download](https://www.microsoft.com/en-us/microsoft-365/microsoft-teams/download-app#desktopAppDownloadregion), [Instructions](https://docs.microsoft.com/en-us/microsoftteams/get-clients#linux)).
However, the development of this project continued, as it is suprior on some aspects (screen share able to share single windows, normal window border [#281](https://github.com/IsmaelMartinez/teams-for-linux/issues/281#issuecomment-601578412), command-line interface, and, of course, open-source).
The original idea was to let the project die when Microsoft implemented a desktop client for Linux, as requested on the [Microsoft Suggestions Forum](https://microsoftteams.uservoice.com/forums/555103-public/suggestions/16911565-linux-client). Microsoft did released a Linux client on early 2020.

Currently, the project is in a stable condition, and should continue as long as needed. Non stable versions are released as pre-release.
IsmaelMartinez is not "implementing new features, only fixing issues, but happy to help and accept new PRs" ([351](https://github.com/IsmaelMartinez/teams-for-linux/issues/351#issuecomment-626590582)).
However, by the [end of 2022](https://learn.microsoft.com/en-us/answers/questions/1791839/where-is-teams-for-linux) Microsoft stopped its support, urging users to use the [PWA version](https://techcommunity.microsoft.com/blog/microsoftteamsblog/microsoft-teams-progressive-web-app-now-available-on-linux/3669846).

Support for this project continues as some users still prefer this open-source version. Their contributions keep the project alive and are a significant part of this growing community.

Currently, the project is stable and will continue as long as the community needs it. Non-stable versions are released as pre-releases. We appreciate any contributions, whether they are issues, ideas, PRs, or anything in between. These contributions are what keep this project thriving.
1 change: 0 additions & 1 deletion app/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ Here is the list of available arguments and its usage:
| minimized | Boolean to start the application minimized | false |
| notificationMethod | Notification method to be used by the application (`web`/`electron`) | *web*, electron |
| ntlmV2enabled | Set enable-ntlm-v2 value | 'true' |
| onlineCheckMethod **automated - please remove** | Type of network test for checking online status. | *https*, dns, native, none |
| optInTeamsV2 | Boolean to opt in to use Teams V2 | false |
| partition | BrowserWindow webpreferences partition | persist:teams-4-linux |
| proxyServer | Proxy Server with format address:port (string) | null |
Expand Down
7 changes: 0 additions & 7 deletions app/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,6 @@ function extractYargConfig(configObject, appVersion) {
describe: 'Set enable-ntlm-v2 value',
type: 'string'
},
onlineCheckMethod: {
deprecated: 'It has been automated.\n Please remove this option from your config file',
default: 'https',
describe: 'Type of network test for checking online status.',
type: 'string',
choices: ['https', 'dns', 'native', 'none']
},
optInTeamsV2: {
default: false,
describe: 'Opt in to use Teams V2',
Expand Down
4 changes: 1 addition & 3 deletions app/login/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

This code handles the login dialog that appears when the app can login using ntlm.

[index.js](index.js) is the entry point that creates an electron browser window with the [login.html](login.html) content.

The [formSender.js](formSender.js) is the minimum js code that is needed to send the code username/password to the electron app in order to callback with the values.
[index.js](index.js) is the entry point that creates an electron browser window with the [login.html](login.html) content. The login.html is a simple html form that sends the username/password to the electron app using the formSender function.

The username/password aren't cached and the browserWindow gets remove once the form is submit.
15 changes: 0 additions & 15 deletions app/login/formSender.js

This file was deleted.

6 changes: 2 additions & 4 deletions app/login/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { app, ipcMain, BrowserWindow } = require('electron');
const { execSync } = require('child_process');
// const path = require('path');
const path = require('path');

let isFirstLoginTry = true;

Expand All @@ -15,9 +15,7 @@ exports.loginService = function loginService(parentWindow, callback) {
show: false,
autoHideMenuBar: true,
webPreferences: {
contextIsolation: false,
nodeIntegration: true
//preload: path.join(__dirname, 'preload.js')
preload: path.join(__dirname, 'preload.js')
}
});
win.once('ready-to-show', () => {
Expand Down
10 changes: 9 additions & 1 deletion app/login/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@
color: rgb(255, 255, 255);">
</form>

<script src='formSender.js'></script>
<script>
function sendForm(event) {
event.preventDefault();
window.api.submitForm({
username: document.getElementById('username').value,
password: document.getElementById('password').value,
});
}
</script>
</body>

</html>
9 changes: 9 additions & 0 deletions com.github.IsmaelMartinez.teams_for_linux.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
<url type="bugtracker">https://github.com/IsmaelMartinez/teams-for-linux/issues</url>
<launchable type="desktop-id">com.github.IsmaelMartinez.teams_for_linux.desktop</launchable>
<releases>
<release version="1.12.1" date="2024-11-25">
<description>
<ul>
<li>Improving security on the loginForm by removing the need of contentIsolation</li>
<li>Removing the already deprecated `onlineCheckMethod` option from the config options</li>
<li>Updating the HISTORY section to be more inline with the current stated of affairs</li>
</ul>
</description>
</release>
<release version="1.12.0" date="2024-11-15">
<description>
<ul>
Expand Down
Loading

0 comments on commit 4d87ad1

Please sign in to comment.