You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by wy...@apache.org on 2026/10/22 09:51:41 UTC
(maka) 17/22: terminal: Keep session identifiers opaque without a private length cap
This is an automated email from the ASF dual-hosted git repository.
M4n5ter pushed a commit to branch rust-preview
in repository https://gitbox.apache.org/repos/asf/maka.git
commit 039294dc101ac30881daa349cf6e8ba4d45304fe
Author: M4n5ter <m4...@gmail.com>
AuthorDate: Thu Oct 22 17:08:20 2026 +0800
terminal: Keep session identifiers opaque without a private length cap
---
products/maka/terminal-shell/src/bindings.rs | 4 ++--
products/maka/terminal-shell/src/entry.rs | 8 ++------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/products/maka/terminal-shell/src/bindings.rs b/products/maka/terminal-shell/src/bindings.rs
index 81c508625d..043eaae5aa 100644
--- a/products/maka/terminal-shell/src/bindings.rs
+++ b/products/maka/terminal-shell/src/bindings.rs
@@ -216,8 +216,8 @@ impl ApplicationHost {
/// Capture a session without rebinding another view's editor or sends.
pub fn session(&self, session_id: String) -> Result<Instance<ScopedHost>, String> {
- if session_id.is_empty() || session_id.len() > 128 {
- return Err("session must contain between 1 and 128 bytes".into());
+ if session_id.is_empty() {
+ return Err("session must not be empty".into());
}
Ok(Instance::new(ScopedHost {
scope: Arc::new(Scope {
diff --git a/products/maka/terminal-shell/src/entry.rs b/products/maka/terminal-shell/src/entry.rs
index fca71e5f48..8c74ae8f8d 100644
--- a/products/maka/terminal-shell/src/entry.rs
+++ b/products/maka/terminal-shell/src/entry.rs
@@ -71,12 +71,8 @@ impl Args {
if !io::stdin().is_terminal() || !io::stdout().is_terminal() {
return Err("the terminal shell requires a terminal on stdin and stdout".into());
}
- if self
- .session
- .as_ref()
- .is_some_and(|session| session.is_empty() || session.len() > 128)
- {
- return Err("session must contain between 1 and 128 bytes".into());
+ if self.session.as_ref().is_some_and(String::is_empty) {
+ return Err("session must not be empty".into());
}
let stop = Arc::new(AtomicBool::new(false));
// Install before opening any Host session or entering terminal modes.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org