Skip to content

Commit

Permalink
fix resume of exec on auth with sync token
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed May 8, 2024
1 parent 473572f commit 86c77be
Show file tree
Hide file tree
Showing 13 changed files with 121 additions and 114 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
### Bugfix
* fix commands in pipe operator with non string arguments
* fix text selection of raw HTML [#939](https://github.com/jcubic/jquery.terminal/issues/939)
* fix resume of exec on auth with sync token

## 2.41.1
### Bugfix
Expand Down
2 changes: 1 addition & 1 deletion css/emoji.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/jquery.terminal-2.41.1.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Copyright (c) 2011-2023 Jakub T. Jankiewicz <https://jcubic.pl/me>
* Released under the MIT license
*
* Date: Thu, 02 May 2024 17:27:44 +0000
* Date: Wed, 08 May 2024 15:59:06 +0000
*/
.terminal .terminal-output .format, .cmd .format,
.cmd-prompt, .cmd-prompt div {
Expand Down
2 changes: 1 addition & 1 deletion css/jquery.terminal-2.41.1.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/jquery.terminal.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Copyright (c) 2011-2023 Jakub T. Jankiewicz <https://jcubic.pl/me>
* Released under the MIT license
*
* Date: Thu, 02 May 2024 17:27:44 +0000
* Date: Wed, 08 May 2024 15:59:06 +0000
*/
.terminal .terminal-output .format, .cmd .format,
.cmd-prompt, .cmd-prompt div {
Expand Down
2 changes: 1 addition & 1 deletion css/jquery.terminal.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/jquery.terminal.min.css.map

Large diffs are not rendered by default.

72 changes: 37 additions & 35 deletions js/jquery.terminal-2.41.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.41.1
* \/ /____/ version DEV
*
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
*
Expand Down Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Mon, 29 Apr 2024 16:20:55 +0000
* Date: Wed, 08 May 2024 15:59:05 +0000
*/
/* global define, Map, BigInt */
/* eslint-disable */
Expand Down Expand Up @@ -5311,8 +5311,8 @@
}
// -------------------------------------------------------------------------
$.terminal = {
version: '2.41.1',
date: 'Mon, 29 Apr 2024 16:20:55 +0000',
version: 'DEV',
date: 'Wed, 08 May 2024 15:59:05 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -9451,40 +9451,42 @@
storage.remove(name + 'login');
}
function login_callback(user, token, silent) {
var next;
if (token) {
pop_user_pass();
set_token(user, token);
in_login = false;
fire_event('onAfterLogin', [user, token]);
next = success;
} else {
if (infinite) {
if (!silent) {
self.error(strings().wrongPasswordTryAgain);
}
self.pop(undefined, true).set_mask(false);
} else {
cmd_ready(function ready() {
var next;
if (token) {
pop_user_pass();
set_token(user, token);
in_login = false;
if (!silent) {
self.error(strings().wrongPassword);
fire_event('onAfterLogin', [user, token]);
next = success;
} else {
if (infinite) {
if (!silent) {
self.error(strings().wrongPasswordTryAgain);
}
self.pop(undefined, true).set_mask(false);
} else {
in_login = false;
if (!silent) {
self.error(strings().wrongPassword);
}
self.pop(undefined, true).pop(undefined, true);
}
self.pop(undefined, true).pop(undefined, true);
// used only to call pop in push
next = error;
}
// used only to call pop in push
next = error;
}
if (self.paused()) {
self.resume();
}
// will be used internaly since users know
// when login success (they decide when
// it happen by calling the callback -
// this function)
if (is_function(next)) {
next();
}
self.off('terminal.autologin');
if (self.paused()) {
self.resume();
}
// will be used internaly since users know
// when login success (they decide when
// it happen by calling the callback -
// this function)
if (is_function(next)) {
next();
}
self.off('terminal.autologin');
});
}
self.on('terminal.autologin', function(event, user, token, silent) {
validate_login(user, token, function(valid) {
Expand Down
6 changes: 3 additions & 3 deletions js/jquery.terminal-2.41.1.min.js

Large diffs are not rendered by default.

64 changes: 33 additions & 31 deletions js/jquery.terminal-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -9451,40 +9451,42 @@
storage.remove(name + 'login');
}
function login_callback(user, token, silent) {
var next;
if (token) {
pop_user_pass();
set_token(user, token);
in_login = false;
fire_event('onAfterLogin', [user, token]);
next = success;
} else {
if (infinite) {
if (!silent) {
self.error(strings().wrongPasswordTryAgain);
}
self.pop(undefined, true).set_mask(false);
} else {
cmd_ready(function ready() {
var next;
if (token) {
pop_user_pass();
set_token(user, token);
in_login = false;
if (!silent) {
self.error(strings().wrongPassword);
fire_event('onAfterLogin', [user, token]);
next = success;
} else {
if (infinite) {
if (!silent) {
self.error(strings().wrongPasswordTryAgain);
}
self.pop(undefined, true).set_mask(false);
} else {
in_login = false;
if (!silent) {
self.error(strings().wrongPassword);
}
self.pop(undefined, true).pop(undefined, true);
}
self.pop(undefined, true).pop(undefined, true);
// used only to call pop in push
next = error;
}
// used only to call pop in push
next = error;
}
if (self.paused()) {
self.resume();
}
// will be used internaly since users know
// when login success (they decide when
// it happen by calling the callback -
// this function)
if (is_function(next)) {
next();
}
self.off('terminal.autologin');
if (self.paused()) {
self.resume();
}
// will be used internaly since users know
// when login success (they decide when
// it happen by calling the callback -
// this function)
if (is_function(next)) {
next();
}
self.off('terminal.autologin');
});
}
self.on('terminal.autologin', function(event, user, token, silent) {
validate_login(user, token, function(valid) {
Expand Down
72 changes: 37 additions & 35 deletions js/jquery.terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.41.1
* \/ /____/ version DEV
*
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
*
Expand Down Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Mon, 29 Apr 2024 16:20:55 +0000
* Date: Wed, 08 May 2024 15:59:05 +0000
*/
/* global define, Map, BigInt */
/* eslint-disable */
Expand Down Expand Up @@ -5311,8 +5311,8 @@
}
// -------------------------------------------------------------------------
$.terminal = {
version: '2.41.1',
date: 'Mon, 29 Apr 2024 16:20:55 +0000',
version: 'DEV',
date: 'Wed, 08 May 2024 15:59:05 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -9451,40 +9451,42 @@
storage.remove(name + 'login');
}
function login_callback(user, token, silent) {
var next;
if (token) {
pop_user_pass();
set_token(user, token);
in_login = false;
fire_event('onAfterLogin', [user, token]);
next = success;
} else {
if (infinite) {
if (!silent) {
self.error(strings().wrongPasswordTryAgain);
}
self.pop(undefined, true).set_mask(false);
} else {
cmd_ready(function ready() {
var next;
if (token) {
pop_user_pass();
set_token(user, token);
in_login = false;
if (!silent) {
self.error(strings().wrongPassword);
fire_event('onAfterLogin', [user, token]);
next = success;
} else {
if (infinite) {
if (!silent) {
self.error(strings().wrongPasswordTryAgain);
}
self.pop(undefined, true).set_mask(false);
} else {
in_login = false;
if (!silent) {
self.error(strings().wrongPassword);
}
self.pop(undefined, true).pop(undefined, true);
}
self.pop(undefined, true).pop(undefined, true);
// used only to call pop in push
next = error;
}
// used only to call pop in push
next = error;
}
if (self.paused()) {
self.resume();
}
// will be used internaly since users know
// when login success (they decide when
// it happen by calling the callback -
// this function)
if (is_function(next)) {
next();
}
self.off('terminal.autologin');
if (self.paused()) {
self.resume();
}
// will be used internaly since users know
// when login success (they decide when
// it happen by calling the callback -
// this function)
if (is_function(next)) {
next();
}
self.off('terminal.autologin');
});
}
self.on('terminal.autologin', function(event, user, token, silent) {
validate_login(user, token, function(valid) {
Expand Down
6 changes: 3 additions & 3 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/jquery.terminal.min.js.map

Large diffs are not rendered by default.

0 comments on commit 86c77be

Please sign in to comment.