Hi,
someone must be injecting localhost...
Turn of the server using e.g.
[anypage]
source = reject.lua
Marcel
Hi,
someone must be injecting localhost...
Turn of the server using e.g.
[anypage]
source = reject.lua
Marcel
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
Quote from marcelvanherkDisplay MoreHi,
someone must be injecting localhost...
Turn of the server using e.g.
[anypage]
source = reject.lua
Marcel
HI Marcel
I fixed the "localhost" to "127.0.0.1" but the thumbs still won't show up. Here is the link:
http://xxxx/dgatewrap.php?port…314804451.631%27&size=560
I think the difference is your link converts to dgate.exe but mine is dgatewrap.php?
thanks!
Lucy
Quote from marcelvanherkDisplay MoreHi,
someone must be injecting localhost...
Turn of the server using e.g.
[anypage]
source = reject.lua
Marcel
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
Quote from marcelvanherkDisplay MoreHi,
someone must be injecting localhost...
Turn of the server using e.g.
[anypage]
source = reject.lua
Marcel
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
The path to the lua files may be incorrect.
Marcel
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
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 marcelvanherkTry 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
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
Quote from marcelvanherkDisplay MoreAh, you are right:
[anypage]
source = reject.lua
header = Content-type: text/html\Cache-Control: no-cache\
reject.lua
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
Ah,
.* matches the longest string, use .-
mode = string.match(query_string, "mode=(.-)%&")
Marcel
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
Quote from marcelvanherkDisplay MoreAh,
.* matches the longest string, use .-
mode = string.match(query_string, "mode=(.-)%&")
Marcel
Hi Marcel
Sorry for keeping bug you. Now I hit another wall. The weasis viewer won't show up. Here is the warning:
QuoteDisplay MoreThis XML file does not appear to have any style information associated with it. The document tree is shown below.
<wado_query xmlns="http://www.weasis.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" wadoURL="http://xxx.xxx.xxx/cgi-bin/dgate.exe" requireOnlySOPInstanceUID="false" overrideDicomTagsList="0x00000000">
<Patient PatientID="0009703828" PatientName="HEAD EXP2" PatientBirthDate="">
<Study StudyInstanceUID="1.3.46.670589.5.2.10.2156913941.892665384.993397" StudyDescription=" " StudyDate="19980414" StudyTime="203538.960689">
<Series SeriesInstanceUID="1.3.46.670589.5.2.10.2156913941.892665339.860724" WadoTransferSyntaxUID="1.2.840.10008.1.2.4.90" SeriesDescription="" SeriesNumber=" 1" Modality="CT">
<Instance SOPInstanceUID="1.3.46.670589.5.2.10.2156913941.892665339.718742" InstanceNumber="0"/>
<Instance SOPInstanceUID="1.3.46.670589.5.2.10.2156913941.892665340.475317" InstanceNumber="1"/>
</Series>
</Study>
</Patient>
</wado_query>
And my reject.lua is like this:
Lucy
Quote from marcelvanherkDisplay MoreAh,
.* matches the longest string, use .-
mode = string.match(query_string, "mode=(.-)%&")
Marcel
Sorry now thumbs view and zipseries, zipstudy, moveseries, etc are all not working.
Lucy
Yes,
they are blocked too..... So each one needs to be recoded in lua, I had not realised that.
Marcel
Don’t have an account yet? Register yourself now and be a part of our community!