mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-20 01:35:13 +03:00
109 lines
4.3 KiB
Diff
109 lines
4.3 KiB
Diff
diff --git a/README.rst b/README.rst
|
|
index 4803b8c..4c23567 100644
|
|
--- a/README.rst
|
|
+++ b/README.rst
|
|
@@ -47,7 +47,7 @@ Usage example:
|
|
ws_url_path="/websocket")
|
|
|
|
if __name__ == '__main__':
|
|
- term_manager = terminado.SingleTermManager(shell_command=['bash'])
|
|
+ term_manager = terminado.SingleTermManager(shell_command=['sh'])
|
|
handlers = [
|
|
(r"/websocket", terminado.TermSocket,
|
|
{'term_manager': term_manager}),
|
|
diff --git a/demos/named.py b/demos/named.py
|
|
index a3703f2..911fe71 100755
|
|
--- a/demos/named.py
|
|
+++ b/demos/named.py
|
|
@@ -30,7 +30,7 @@ class NewTerminalHandler(tornado.web.RequestHandler):
|
|
self.redirect("/" + name, permanent=False)
|
|
|
|
def main():
|
|
- term_manager = NamedTermManager(shell_command=['bash'],
|
|
+ term_manager = NamedTermManager(shell_command=['sh'],
|
|
max_terminals=100)
|
|
|
|
handlers = [
|
|
diff --git a/demos/single.py b/demos/single.py
|
|
index e63f469..9452828 100755
|
|
--- a/demos/single.py
|
|
+++ b/demos/single.py
|
|
@@ -14,7 +14,7 @@ class TerminalPageHandler(tornado.web.RequestHandler):
|
|
ws_url_path="/websocket")
|
|
|
|
def main(argv):
|
|
- term_manager = SingleTermManager(shell_command=['bash'])
|
|
+ term_manager = SingleTermManager(shell_command=['sh'])
|
|
handlers = [
|
|
(r"/websocket", TermSocket,
|
|
{'term_manager': term_manager}),
|
|
diff --git a/demos/uimod.py b/demos/uimod.py
|
|
index 26adcc2..cfb0875 100644
|
|
--- a/demos/uimod.py
|
|
+++ b/demos/uimod.py
|
|
@@ -15,7 +15,7 @@ class TerminalPageHandler(tornado.web.RequestHandler):
|
|
ws_url_path="/websocket")
|
|
|
|
def main(argv):
|
|
- term_manager = SingleTermManager(shell_command=['bash'])
|
|
+ term_manager = SingleTermManager(shell_command=['sh'])
|
|
handlers = [
|
|
(r"/websocket", TermSocket,
|
|
{'term_manager': term_manager}),
|
|
diff --git a/demos/unique.py b/demos/unique.py
|
|
index 71bd85c..577981c 100755
|
|
--- a/demos/unique.py
|
|
+++ b/demos/unique.py
|
|
@@ -14,7 +14,7 @@ class TerminalPageHandler(tornado.web.RequestHandler):
|
|
ws_url_path="/websocket")
|
|
|
|
def main(argv):
|
|
- term_manager = UniqueTermManager(shell_command=['bash'])
|
|
+ term_manager = UniqueTermManager(shell_command=['sh'])
|
|
handlers = [
|
|
(r"/websocket", TermSocket,
|
|
{'term_manager': term_manager}),
|
|
diff --git a/doc/websocket.rst b/doc/websocket.rst
|
|
index 7f429c4..1c9e511 100644
|
|
--- a/doc/websocket.rst
|
|
+++ b/doc/websocket.rst
|
|
@@ -9,7 +9,7 @@ any other::
|
|
app = tornado.web.Application([
|
|
# ... other handlers ...
|
|
(r"/websocket", terminado.TermSocket,
|
|
- {'term_manager': terminado.SingleTermManager(shell_command=['bash'])}),
|
|
+ {'term_manager': terminado.SingleTermManager(shell_command=['sh'])}),
|
|
], **kwargs)
|
|
|
|
Now, a page in your application can connect to ``ws://<host>/websocket``. Using
|
|
@@ -22,7 +22,7 @@ Now, a page in your application can connect to ``ws://<host>/websocket``. Using
|
|
.. warning::
|
|
|
|
:class:`~terminado.TermSocket` does not authenticate the connection at all,
|
|
- and using it with a program like ``bash`` means that anyone who can connect
|
|
+ and using it with a program like ``sh`` means that anyone who can connect
|
|
to it can run commands on your server. It is up to you to integrate the
|
|
handler with whatever authentication system your application uses. For
|
|
instance, in IPython, we subclass it like this::
|
|
diff --git a/terminado/tests/basic_test.py b/terminado/tests/basic_test.py
|
|
index 0f62cd6..540e4b3 100644
|
|
--- a/terminado/tests/basic_test.py
|
|
+++ b/terminado/tests/basic_test.py
|
|
@@ -140,14 +140,14 @@ class TermTestCase(tornado.testing.AsyncHTTPTestCase):
|
|
|
|
def get_app(self):
|
|
self.named_tm = NamedTermManager(
|
|
- shell_command=['bash'],
|
|
+ shell_command=['sh'],
|
|
max_terminals=MAX_TERMS,
|
|
)
|
|
|
|
- self.single_tm = SingleTermManager(shell_command=['bash'])
|
|
+ self.single_tm = SingleTermManager(shell_command=['sh'])
|
|
|
|
self.unique_tm = UniqueTermManager(
|
|
- shell_command=['bash'],
|
|
+ shell_command=['sh'],
|
|
max_terminals=MAX_TERMS,
|
|
)
|
|
|