Skip to content

Commit

Permalink
[feature] Increasing the level of security.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy Zarubin committed Oct 26, 2024
1 parent 0615aef commit 42cbedb
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Subscribe and like!

[![Version](https://img.shields.io/badge/deb_package-0.0.4-blue)](https://github.com/keygenqt/aurora-toolbox/releases)
[![Version](https://img.shields.io/badge/deb_package-0.0.5-blue)](https://github.com/keygenqt/aurora-toolbox/releases)

![Preview](https://raw.githubusercontent.com/keygenqt/aurora-toolbox/refs/heads/main/files/images/preview.png)

Expand Down
2 changes: 1 addition & 1 deletion data/ui/dialogs/AboutDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<property name="presentation-mode">floating</property>
<property name="application-icon">com.keygenqt.aurora-toolbox</property>
<property name="application-name" translatable="yes">Aurora Toolbox</property>
<property name="version">0.0.4</property>
<property name="version">0.0.5</property>
<property name="copyright">© 2024 KeyGenQt</property>
<property name="issue_url">https://github.com/keygenqt/aurora-toolbox/issues</property>
<property name="developer-name" translatable="yes">Vitaliy Zarubin</property>
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ hide:
#### Install

```shell
sudo dpkg -i aurora-toolbox_0.0.4-1_amd64.deb
sudo dpkg -i aurora-toolbox_0.0.5-1_amd64.deb
```

#### Install dependency
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Define our project
project(
'aurora-toolbox',
version: '0.0.4',
version: '0.0.5',
license: ['Apache 2.0'],
meson_version: '>= 0.59.0',
default_options: ['cpp_std=c++17', 'cpp_rtti=false', 'cpp_eh=none',
Expand Down
2 changes: 1 addition & 1 deletion po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ msgstr "Взаимодействие с Platform SDK."

#: data/ui/pages/psdk/PsdkPage.ui:71
msgid "Re-sign the package"
msgstr "Пере-подпишите пакет"
msgstr "Переподписать пакет"

#: data/ui/pages/psdk/PsdkPage.ui:84
msgid "Add Sudoers"
Expand Down
6 changes: 3 additions & 3 deletions scripts/deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Build and creae deb package
##############################

read -p "You change '// @todo debug' code? (y/n)? " choice
read -p "You change '@todo debug' code? (y/n)? " choice
case "$choice" in
y|Y ) echo "yes";;
n|N ) exit 0;;
Expand Down Expand Up @@ -78,5 +78,5 @@ rm -rf $DEB_FOLDER
dpkg -x $FOLDER/$DEB_FOLDER.deb $FOLDER/$DEB_FOLDER

# Install / Remove
# sudo dpkg -r com.keygenqt.aurora-toolbox
# sudo dpkg -i release/aurora-toolbox_0.0.4-1_amd64.deb
sudo dpkg -r com.keygenqt.aurora-toolbox
sudo dpkg -i release/aurora-toolbox_0.0.5-1_amd64.deb
14 changes: 13 additions & 1 deletion src/base/connectors/ShellExec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';

import { Log } from '../utils/Log.js';

Expand Down Expand Up @@ -78,10 +79,21 @@ export const ShellExec = {
* @returns Promise
*/
communicateAsync(query = []) {
Log.debug(query);
return new Promise((resolve, _) => {
try {
const arg = Gio.SubprocessFlags.STDOUT_PIPE | Gio.SubprocessFlags.STDERR_PIPE;

if (query[query.length-1].includes('password')) {
// Get password
const password = query[query.length-1].split('?')[1].split('&').filter((e) => e.includes('password'))[0].split('=')[1];
// Remove password from query
query[query.length-1] = query[query.length-1]
.replace(`&password=${password}`, '')
.replace(`?password=${password}`, '')
// Set env
GLib.setenv('cli_password', password, true);
}

const subProcess = Gio.Subprocess.new(query, arg);
subProcess.communicate_utf8_async(null, null, (proc, res) => {
let [success, stdout, stderr] = proc?.communicate_utf8_finish(res);
Expand Down
2 changes: 1 addition & 1 deletion src/base/constants/AppConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const AppConstants = Object.freeze({
`${GLib.getenv('HOME')}/.local/bin/aurora-cli`,
// @todo debug
// 'python3',
// '/home/keygenqt/Documents/Home/Projects/aurora-cli/builds/aurora-cli-3.0.7.pyz'
// '/home/keygenqt/Documents/Home/Projects/aurora-cli/builds/aurora-cli-3.0.9.pyz'
],
Language: {
'ru': 'ru_RU.utf-8',
Expand Down

0 comments on commit 42cbedb

Please sign in to comment.