Update 1.4.17d released

  • Thanks, Marcel.


    But it turns off the web access from dgatewrap.php also. For safety reason, I don't want people to access the data directly through /cgi-bin/dgate.exe without a username/password. Is there a way just to disable this direct link?


    Thanks,
    Lucy


  • HI Marcel


    I think the wrapper tries to replace "dgate.exe" with "dgatewrap.php" for every page. Now I replaced the original line in dgatewrap.php and now it works.


    /*$replacements = array("HREF=\"$php_wrapper","ACTION=\"$php_wrapper","HREF=$php_wrapper","ACTION=$php_wrapper"); */


    $replacements = array("HREF=\"cgi-bin\dgate.exe","ACTION=\"cgi-bin\dgate.exe","HREF=cgi-bin\dgate.exe","ACTION=cgi-bin\dgate.exe");


    Thanks,
    Lucy


  • HI Marcel


    I can't find reject.lua. Can you send me a copy?


    Thanks,
    Lucy


    Quote from marcelvanherk

    Hi,


    in reject.lua you must dofile the right lua file depending on 'mode'. have not tried this myself.


    Marcel

  • It does not exists but should like this:


    reject.lua


    Marcel

  • Thanks. Put your code into reject1.lua and added the line in the dicom.ini but it still gives me error like this on every page.
    ---------------------------
    [anypage]
    source = c:\dicomserver\lua\reject1.lua
    -----------------------------
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    --------------------------------


    It seems like the mode info didn't pass through?


    Lucy


    Quote from marcelvanherk

    It does not exists but should like this:


    reject.lua


    Marcel

  • Thanks, Marcel.


    I tried adding the path and it is still not working. But I tried to hard code the mode='nh_top' in the reject1.lua and now the nh_top mode works. So I suspect that the mode variable was not passed into the reject1.lua for some reason?


    Lucy


    Quote from marcelvanherk

    Try to code the path in the source, e.g.,


    if allowed[mode]==1 then
    dofile('c:\\xampp\\cgi-bin\\viewers\\'.. mode .. '.lua')
    end


    Marcel

  • Ah, you are right:


    [anypage]
    source = reject.lua
    header = Content-type: text/html\Cache-Control: no-cache\


    reject.lua

    Code
    print(query_string)
    print(mode)


    prints:


    mode=top AnyPage


    mode is set to the internal AnyPage redirection. So add:


    mode = string.match(query_string, "mode=(.*)%&")


    to the top of reject.lua then it should work.


    Marcel

  • Thanks! I think I almost got there. But I can't figure out why I got another section after mode. For example, my


    query_string: mode=nh_top&port=5678&address=127.0.0.1


    and it returns:
    mode: nh_top&port=5678


    Lucy


  • Great it now works. Thank you!
    In case of the first query with only "mode=nh_top", I added '&' at the end before string.match.
    query_string = query_string .. '&'


    And now everypage works!


    Thanks again,
    Lucy



  • Hi Marcel


    Sorry for keeping bug you. Now I hit another wall. The weasis viewer won't show up. Here is the warning:


    And my reject.lua is like this:


    Lucy


  • Instead of Allowed, can we do disallowing old mode like querypatient?


    Lucy


    Quote from marcelvanherk

    Yes,


    they are blocked too..... So each one needs to be recoded in lua, I had not realised that.


    Marcel

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!