You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -191,7 +191,7 @@ JavaScript-based settings are created to facilitate the development of fully tra
191
191
192
192
The synchronous warning function is implemented using standard JavaScript Confirm dialog, which stops the execution of all JavaScript code within the page and waits until 'Yes' or 'No' is finally pressed. The Confirm dialog looks like a normal native dialog.
193
193
194
-
The asynchronous warning function is implemented using JavaScript, HTML and CSS code, does not stop the execution of any JavaScript code within the page and does not wait for the user's decision. If the user chooses to close the window, a special window closing URL, ```http://perl-executing-browser-pseudodomain/close-window.function```, has to be sent to the browser. Upon receiving this URL, PEB closes the window from where the window closing URL was requested. The warning dialog can be styled to blend with the rest of the HTML interface or to attract attention and this is the main advantage of using an asynchronous warning dialog. Developers can implement it using any suitable JavaScript library or custom code.
194
+
The asynchronous warning function is implemented using JavaScript, HTML and CSS code, does not stop the execution of any JavaScript code within the page and does not wait for the user's decision. If the user chooses to close the window, a special window closing URL, ```http://local-pseudodomain/close-window.function```, has to be sent to the browser. Upon receiving this URL, PEB closes the window from where the window closing URL was requested. The warning dialog can be styled to blend with the rest of the HTML interface or to attract attention and this is the main advantage of using an asynchronous warning dialog. Developers can implement it using any suitable JavaScript library or custom code.
195
195
196
196
The following code is an example of both synchronous and asynchronous warning functions. It is expected, that one of them will be present in a PEB-based application where user data is to be protected against accidental loss. If both functions are present, the asynchronous one will take precedence. The asynchronous function in the example code is implemented using [jQuery] (https://jquery.com/) and [Alertify.js] (http://alertifyjs.com/).
197
197
@@ -207,7 +207,7 @@ JavaScript-based settings are created to facilitate the development of fully tra
207
207
alertify.confirm("Are you sure you want to close the window?", function (confirmation) {
@@ -217,11 +217,11 @@ JavaScript-based settings are created to facilitate the development of fully tra
217
217
218
218
219
219
## Security
220
-
Being a GUI for Perl 5 desktop applications, PEB executes only Perl scripts distributed with the browser binary and they are treated as ordinary desktop programs with normal user privileges. Reasonable security restrictions are implemented in both C++ and Perl code, but they do not constitute a sandbox for Perl scripts. PEB users can not endanger the opreating system or fall victims to remote or arbitrary Perl code, but they still have full access to their own local data.
220
+
Being a GUI for Perl 5 desktop applications, PEB executes with normal user privileges only local Perl scripts in it's application directory. Reasonable security restrictions are implemented in both C++ and Perl code, but they do not constitute a sandbox for Perl scripts. PEB users can not endanger the opreating system or fall victims to remote Perl code, but they still have full access to their own local data.
221
221
222
222
**Security features based on C++ code:**
223
223
* PEB can not and does not download remote files on hard disk and can not execute any Perl scripts from remote locations.
224
-
* Users have no dialog to select arbitrary local scripts for execution by PEB. Only scripts within the ```{PEB_binary_directory}/resources/app``` directory can be executed if they are invoked from the PEB pseudo-domain: ```http://perl-executing-browser-pseudodomain/```.
224
+
* Users have no dialog to select arbitrary local scripts for execution by PEB. Only scripts within the ```{PEB_binary_directory}/resources/app``` directory can be executed if they are invoked from the PEB pseudo-domain: ```http://local-pseudodomain/```.
225
225
* If PEB is started with administrative privileges, it displays a warning page and no scripts can be executed.
226
226
* Perl 5 scripts are executed in a clean environment and only ```REQUEST_METHOD```, ```QUERY_STRING``` and ```CONTENT_LENGTH``` environment variables (borrowed from the CGI protocol) are used for communication between local HTML forms and local Perl scripts.
227
227
@@ -236,14 +236,14 @@ JavaScript-based settings are created to facilitate the development of fully tra
236
236
237
237
## Special URLs for Users and Interaction with Files and Folders
The pseudo-domain is used to call all local files and all special URLs representing browser functions.
241
241
It is intercepted inside PEB and is not passed to the underlying operating system.
242
242
243
-
***Close current window:**```http://perl-executing-browser-pseudodomain/close-window.function```
243
+
***Close current window:**```http://local-pseudodomain/close-window.function```
244
244
Please note that using this URL the window from where this URL was called will be closed immediately without any check for unsaved user data in HTML forms. Window closing URL can be called not only by clicking a link, but also by using a jQuery AJAX GET request.
245
245
246
-
***Select single file:**```http://perl-executing-browser-pseudodomain/open-file.function?target=DOM_element```
246
+
***Select single file:**```http://local-pseudodomain/open-file.function?target=DOM_element```
247
247
The full path of the selected file will be inserted in the target DOM element of the calling local page.
248
248
Having a target DOM element is mandatory when using this special URL.
249
249
HTML event called ```inodeselection``` is emitted when the path of the selected file is inserted into the calling local page.
@@ -258,7 +258,7 @@ JavaScript-based settings are created to facilitate the development of fully tra
The full paths of the selected files will be inserted in the target DOM element of the calling local page.
275
275
Having a target DOM element is mandatory when using this special URL.
276
276
```inodeselection``` HTML event is emitted when the paths of the selected files are inserted into the calling local page.
277
277
Different file names are separated by a semicolon - ```;```
278
278
279
-
***Select new file name:**```http://perl-executing-browser-pseudodomain/new-file-name.function?target=DOM_element```
279
+
***Select new file name:**```http://local-pseudodomain/new-file-name.function?target=DOM_element```
280
280
The full path of the new file name will be inserted in the target DOM element of the calling local page.
281
281
Having a target DOM element is mandatory when using this special URL.
282
282
```inodeselection``` HTML event is emitted when the new file name is inserted into the calling local page.
283
283
284
284
Please note that the actual creation of the new file is not performed directly by PEB. Only after the new file name is transmitted to a Perl script, the script itself creates the new file.
The full path of the selected directory will be inserted in the target DOM element of the calling local page.
288
288
Having a target DOM element is mandatory when using this special URL.
289
289
```inodeselection``` HTML event is emitted when the path of the selected directory is inserted into the calling local page.
290
290
291
291
Please note that if you choose to create a new directory, it will be created immediately by PEB and it will be already existing when it will be passed to a local Perl script.
Any Perl script can be selected for debugging in an embedded HTML user interface. The debugger output is displayed together with the syntax highlighted source code of the debugged script and it's modules. Syntax highlighting is achieved using [Syntax::Highlight::Engine::Kate] (https://metacpan.org/release/Syntax-Highlight-Engine-Kate) CPAN module by Hans Jeuken and Gábor Szabó. Interaction with the built-in Perl debugger is an idea proposed by Valcho Nedelchev and provoked by the scarcity of graphical frontends for the Perl debugger.
@@ -306,14 +306,14 @@ JavaScript-based settings are created to facilitate the development of fully tra
306
306
307
307
## Special URLs for Interaction with the Perl Debugger
Using the above URL the selected file will be loaded in the Perl debugger, but no command will be automatically issued. Any command can be given later by buttons or by typing it in an input box inside the HTML user interface of the debugger.
Using the above URL, the selected file will be loaded in the Perl debugger, the ```M``` command ('Display all loaded modules') will be immediately issued and all resulting output will be displayed. Any command can be given later and step-by-step debugging can be performed.
318
318
319
319
## Supported File Extensions for Local Content
@@ -340,8 +340,8 @@ JavaScript-based settings are created to facilitate the development of fully tra
340
340
341
341
* PEB is not a general purpose web browser and does not have all traditional features of general purpose web browsers.
342
342
* PEB is not an implementation of the CGI protocol. It uses only three environment variables together with the GET and POST methods from the CGI protocol in a purely local context without any attempt to communicate with the outside world.
343
-
* PEB does not embed any Perl interpreter in itself and rellies on an external Perl distribution, which could be easily changed or upgraded independently.
344
-
* Perl scripts executed by PEB, unlike JavaScript in general purpose web browsers, have no direct access to the HTML DOM tree of any page.
343
+
* PEB does not embed any Perl interpreter in itself and rellies on an external Perl distribution, which could be easily changed or upgraded independently.
344
+
Perl scripts executed by PEB, unlike JavaScript in general purpose web browsers, have no direct access to the HTML DOM tree of any page.
<li><ahref="http://perl-executing-browser-pseudodomain/perl-debugger.function?action=select-file&command=M" target="iframe_a">List All Modules</a></li>
46
-
<li><ahref="http://perl-executing-browser-pseudodomain/perl-debugger.function?action=select-file&command=S" target="iframe_a">List All Subroutine Names</a></li>
47
-
<li><ahref="http://perl-executing-browser-pseudodomain/perl-debugger.function?action=select-file&command=V" target="iframe_a">List All Variables</a></li>
0 commit comments