issue-#104 calling URLs and commands (InfoCmds capabilities)

Merged to the master branch

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Postby Josef Templ » Tue Feb 23, 2016 10:17 pm

Sorry, bhe current implementation is too primitive in several aspects and too complicated in others.
It is based on speculations about possible use cases instead of experience,

- Josef
User avatar
Josef Templ
 
Posts: 2001
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Postby Ivan Denisov » Wed Feb 24, 2016 12:30 am

Josef Templ wrote:Sorry, bhe current implementation is too primitive in several aspects and too complicated in others.
It is based on speculations about possible use cases instead of experience.

Why do you think so?
Ivan Denisov
 
Posts: 1694
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Postby Ivan Denisov » Wed Feb 24, 2016 2:49 pm

I made simple demo to demonstrate the security issue.

1. Please, prepare the folder with clean BlackBox.
2. Open this file with BlackBox:
demo.rtf
(3.37 KiB) Downloaded 104 times

3. Click the link from imported file
4. Check is there a Docu folder still exists

It is working only under Wine. I noticed, that it does not work in Windows.
Ivan Denisov
 
Posts: 1694
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Postby Josef Templ » Sat Feb 27, 2016 9:22 am

Ivan Denisov wrote:
Josef Templ wrote:Sorry, bhe current implementation is too primitive in several aspects and too complicated in others.
It is based on speculations about possible use cases instead of experience.

Why do you think so?


I don't see the need to have actions involved.

I don't see a parameter that allows one to specify the current directory.

I am sorry, but I don't have much time now to go into more details.

I hope that in the next days I will be able to dig into this issue more deeply.

- Josef
User avatar
Josef Templ
 
Posts: 2001
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Postby Ivan Denisov » Sun Feb 28, 2016 3:23 pm

I put request to the Russian board. Maybe they will help to find better solution. Alexander already gave an idea.
http://forum.oberoncore.ru/viewtopic.php?f=47&t=5629
Ivan Denisov
 
Posts: 1694
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Postby Ivan Denisov » Tue Mar 01, 2016 5:58 pm

I had found that changing of compilation list was my fault. After small cleaning the suggested changes are:
http://redmine.blackboxframework.org/pr ... 115335d51f

Now I am working on making BlackBox run Start and Open in new threads. This will not require actions and solve more problems.
Ivan Denisov
 
Posts: 1694
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Postby Ivan Denisov » Tue Mar 01, 2016 6:33 pm

Ivan Denisov
 
Posts: 1694
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Postby Josef Templ » Wed Mar 02, 2016 7:24 am

I didn't have time to look into this in full detail but it seems that it is getting even more complicated now.
The called process is executed in parallel anyway, only the startup would be in an additional thread,
as far as I understand it.
Now, if you press a link and the startup is slow for some reason, nothing happens and you don't know
what is going on. At some time later a window may pop up, or not.
For me a normal synchronous behavior would be much more usefull and it is much simpler.
It would also allow to report errors back to the caller, I think.

- Josef
User avatar
Josef Templ
 
Posts: 2001
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Postby Zinn » Wed Mar 02, 2016 5:08 pm

Josef, I use currently another solution:

Code: Select all
   PROCEDURE (h: ExtCallHook) Open* (fileName: ARRAY OF CHAR);
      VAR res: INTEGER; win_fileName: ARRAY[untagged] 2048 OF CHAR;
   BEGIN
      IF Dialog.IsWine() THEN
         win_fileName := "winebrowser " + fileName$
      ELSE
         win_fileName := fileName$
      END;
      res := WinApi.ShellExecuteW(0, NIL, win_fileName, NIL, NIL, WinApi.SW_SHOWNORMAL);
   END Open;

   PROCEDURE (h: ExtCallHook) Start* (exeName: ARRAY OF CHAR);
      VAR res: INTEGER; info: WinApi.STARTUPINFOW; process: WinApi.PROCESS_INFORMATION;
   BEGIN
      WinApi.GetStartupInfoW(info);
      info.wShowWindow := WinApi.SW_NORMAL;
      res := WinApi.CreateProcessW(NIL, exeName, NIL, NIL, WinApi.FALSE, {}, 0, NIL, info, process)
   END Start;

Procedure Open uses the Wine test and the code from HostTextConv.ShellExecute
Procedure Start uses the code from HostDialog.Start

We can use this version also without Hook by deleting (h: ExtCallHook) and moving it from Host/Mod/Dialog to System/Mod/Dialog.
- Helmut
Zinn
 
Posts: 470
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main

Re: issue-#104 calling URLs and commands (InfoCmds capabilit

Postby Ivan Denisov » Thu Mar 03, 2016 1:20 am

Some applications like Total Commander can run very slow because they starting some disks in suspend mode. This will stop any execution. And if this application is like server, there will be the same problems like in the issue-#105. So in the case of mouse tracking you understand that hanging of blackbox is bad. However here, Josef, you saying that "this is not a bug, it is a feature".

Introducing this feature #104 into basic BlackBox I am trying to solve the problem of multiple versions of InfoCmds for running links. This delayed start was introduced by OberonCore team, so they think that this is essential. If we will not introduce this feature, we will not solve the problem of uniting all version of InfoCmds in basic BlackBox.

We can use this version also without Hook by deleting (h: ExtCallHook) and moving it from Host/Mod/Dialog to System/Mod/Dialog.

Helmut, WinApi should not appear in System subsystem because it is platform independent.
Ivan Denisov
 
Posts: 1694
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

PreviousNext

Return to Resolved (Features)

Who is online

Users browsing this forum: No registered users and 0 guests

cron