Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 5,876
» Latest member: qurangpt
» Forum threads: 2,139
» Forum posts: 10,409
Full Statistics
|
Latest Threads |
iw15.5.10 does not addres...
Forum: IntraWeb General Discussion
Last Post: valmeras
10 hours ago
» Replies: 2
» Views: 167
|
Cookies with the SameSite...
Forum: IntraWeb General Discussion
Last Post: valmeras
03-27-2024, 06:59 PM
» Replies: 0
» Views: 55
|
303 Redirect and Response...
Forum: IntraWeb General Discussion
Last Post: ALW2019
03-26-2024, 02:30 PM
» Replies: 0
» Views: 90
|
smmFunctions.pas
Forum: IntraWeb General Discussion
Last Post: Mikael Nilsson
03-26-2024, 10:33 AM
» Replies: 0
» Views: 99
|
TIWjQDBGrid paging
Forum: IntraWeb General Discussion
Last Post: troberts
03-26-2024, 04:06 AM
» Replies: 0
» Views: 102
|
Problem with cache and 40...
Forum: IntraWeb General Discussion
Last Post: troberts
03-25-2024, 01:54 AM
» Replies: 0
» Views: 110
|
IWModalWindow from differ...
Forum: IntraWeb General Discussion
Last Post: bjoernb
03-24-2024, 10:52 PM
» Replies: 0
» Views: 133
|
jQGrid css and js files
Forum: IntraWeb General Discussion
Last Post: medzoom
03-22-2024, 07:06 PM
» Replies: 2
» Views: 2,525
|
iwSelect list update in a...
Forum: IntraWeb General Discussion
Last Post: joelcc
03-20-2024, 08:07 PM
» Replies: 0
» Views: 142
|
IntraWeb Certificate Mana...
Forum: IntraWeb General Discussion
Last Post: DavidChiq
03-19-2024, 06:27 PM
» Replies: 1
» Views: 2,086
|
|
|
Event to authorize access to IW forms |
Posted by: cprmlao@hotmail.com - 11-20-2019, 11:14 PM - Forum: IntraWeb General Discussion
- Replies (8)
|
|
Hi,
I have many forms in my project.
I have created a table to put the rights of each user.
Some users only can access some forms.
What would be the better event to check if a user is authorized to load and see the form?
I´d like to show a dialog message in that event if the user is not authorized.
I think is a a event in servercontroller. But, what? and How to send a async message to browse saying the user is not authorized? Is possible to send a message from servercontroller and not from a form?
I will appreciate some others ideas about it
Regards ,
Luiz
|
|
|
Impossible to break SSL request w/o AV |
Posted by: evgenyk - 11-19-2019, 02:20 PM - Forum: Indy General Discussion
- Replies (1)
|
|
Hi,
How to correctly break SSL request that is launched in background thread ?
nowadays I have situation when TIdSSLSocket is destroyed after calling Disconnect:
Quote:IdSSLOpenSSL.TIdSSLSocket.Destroy
System.TObject.Free
IdSSLOpenSSL.TIdSSLIOHandlerSocketOpenSSL.Close
IdTCPConnection.TIdTCPConnection.Disconnect(???)
IdTCPConnection.TIdTCPConnection.Disconnect
but TIdSSLSocket.Send is still executed and I have AV because fSSL is nil:
Code: function TIdSSLSocket.Send(const ABuffer: TIdBytes; AOffset, ALength: Integer): Integer;
var
ret, err: Integer;
begin
Result := 0;
repeat
ret := SSL_write(fSSL, @ABuffer[AOffset], ALength); //<<<< AV
call-stack for this is
Quote:IdSSLOpenSSL.TIdSSLSocket.Send(...)
IdSSLOpenSSL.TIdSSLIOHandlerSocketOpenSSL.SendEnc(???,???,224)
IdSSL.TIdSSLIOHandlerSocketBase.WriteDataToTarget(???,???,224)
IdIOHandler.TIdIOHandler.WriteDirect(...)
IdIOHandler.TIdIOHandler.WriteBufferFlush(???)
IdIOHandler.TIdIOHandler.WriteBufferFlush
IdIOHandler.TIdIOHandler.WriteBufferClose
IdHTTP.TIdHTTPProtocol.BuildAndSendRequest(???)
IdHTTP.TIdCustomHTTP.ConnectToHost($7EA93560,???)
IdHTTP.TIdCustomHTTP.DoRequest(???,'https://.....',$7E91CBF0,$7E9B7AA0,(...))
IdHTTP.TIdCustomHTTP.Post('https://......',$8663B0,$7E9B7AA0)
as a workaround, I can suggest to add checking like if fSSL = nil then Break; in the beginning of loop
|
|
|
Mixing of usersessions? |
Posted by: etwoss - 11-16-2019, 08:51 AM - Forum: IntraWeb General Discussion
- Replies (4)
|
|
Hi
I use a datamodule pool with my program. Each user can have a different db to look at. The usersession holds the path to that database,
Now i adjusted the Lock and Unlock :
Code: function LockDataModule: TDtmMain;
begin
Result := TDtmMain(TIWServerController(GServerController).Pool.Lock);
if Result.IBDatabase.Connected then
begin
if Result.IBTransaction.InTransaction then
Result.IBTransaction.Rollback;
Result.IBDatabase.Connected := False;
end;
Result.IBDatabase.DatabaseName := UserSession.DbPad;
Result.IBDatabase.Open;
end;
And
Code: procedure UnlockDataModule(ADataModule: TDtmMain);
var
LTemp: TDataModule;
begin
LTemp := ADataModule;
if TDtmMain(LTemp).IBTransaction.InTransaction then
TDtmMain(LTemp).IBTransaction.Rollback;
TDtmMain(LTemp).IBDatabase.CloseDataSets;
TDtmMain(LTemp).IBDatabase.Close;
TDtmMain(ADataModule).IBDatabase.DatabaseName := '';
TIWServerController(GServerController).Pool.Unlock(LTemp);
end;
However, once in every 4-6 months we have a customer showing me data from another customers db! Which is ofcourse not what i want.
After loggin out/in the users gets the correct database info.
It's all about the line
Code: Result.IBDatabase.DatabaseName := UserSession.DbPad;
Which should work properly , if it choses someone else its usersession, this goes wrong.
Any idea what could go wrong ???
Eric
|
|
|
E-Mail Validate?? |
Posted by: ShaneStump - 11-15-2019, 07:21 PM - Forum: IntraWeb General Discussion
- Replies (5)
|
|
Howdy All!
I have an e-mail regexp that I have been using that validates most e-mail addresses.
I have tried it (and many others I have seen in stackoverflow) and none of them validate a test e-mail account I have been given by Viator. I have tried some of the online validators and they work!
So my question is does anyone have a C++ or Delphi regexp that can validate the following e-mail account and return True.
MSG-8b17fa92-7b35-4fdb-9f18-f8a69252e019+BR-999999999@expmessaging.tripadvisor.com
Thanks in advance,
Shane
|
|
|
IW unable to server static files in folder |
Posted by: cprmlao@hotmail.com - 11-15-2019, 01:53 PM - Forum: IntraWeb General Discussion
- Replies (9)
|
|
Hi I am trying create a valid SSL certificate withn zeroSSL.
To validate the CSR I choice HTTP option and zeroSSL saids I have to put some files in "{wwwroot}.well-known/acme-challenge/" folder
I am having a problem where IW is unable to server static files when I create ".well-known/acme-challenge/" into wwwroot.
IW returns an error of "Resource not found".
It seems IW has a problem com "hyphen". I was searching in the google, I can see "hyphen" is a legal char in a URL and doesn´t needs to encode it.
But if I encode it, I also have the same problem.
Code: 127.0.0.1/.well-known/acme-challenge/teste.txt // here I get resource not found
I did a test changing the names folder to the next, and it works
Code: 127.0.0.1/.well-known/acme_challenge/teste.txt // here it works
But I need to use:
Code: 127.0.0.1/.well-known/acme-challenge/teste.txt
I have tried to change hyphen with "%2D" but no look.
How could I fix it?
Is it a IW bug?
Regards, Luiz
|
|
|
TIdTelnet Disconnect |
Posted by: omarreis - 11-15-2019, 01:03 PM - Forum: Indy General Discussion
- Replies (4)
|
|
I'm using telnet client in my app, to access streaming market data.
It works ok for Windows and iOS, but on Android the app hangs
for several seconds when telnet.Disconnect is called. So much that
Android detects the app is stalled and terminates it.
I understand that Connect and Disconnect can block the
execution, so they are not to be called from the UI thread.
But why Disconnect takes so long ?
One guy suggested on stackoverflow that the reader thread
was locked or not finishing, and that blocked the Disconnect call.
So I tried to create a thread dedicated to disconnect.
It seems to work
Code: procedure TForm1.ThreadedTelnetDisconnect;
var aThreadDisconnect:TThread;
begin
aThreadDisconnect := TThread.CreateAnonymousThread(
procedure begin
IdTelnet1.Disconnect;
end);
aThreadDisconnect.start();
end;
|
|
|
GStack.LocalAddress returns empty only with Delphi 10 |
Posted by: processeur_fou - 11-14-2019, 05:15 PM - Forum: Indy General Discussion
- Replies (8)
|
|
Hello,
I use UDP to send a video stream to VLC, it works very well when I have a local network active (Wifi or Ethernet).
But if I have no Wifi and no Ethernet card activated, it works if I compile my source code using Delphi2010 ( using 127.0.0.1 IP address) but doesn’t work if I compile my source code using Delphi 10.
After searching, I discover that my procedure to find local IP can find 127.0.0.1 ( Nbr of local IP =1) using Delphi 2010 but find no local IP using Delphi 10 (Nbr of local IP = 0)
Code: TIdStack.IncUsage; LocalIPasked := '0.0.0.0';
try //**************************************************************
NbLocalIP := GStack.LocalAddresses.Count;
Memo1.Lines.Add(Format('nbr of local IP= %d ', [NbLocalIP]));
for i := 0 to NbLocalIP-1 do
begin
Memo1.Lines.Add(Format('IP n° %d = %s', [i + 1, GStack.LocalAddresses[i]]));
end;
finally
TIdStack.DecUsage;
end;
Why do I have this difference between Delphi2010 and Delphi_10 ? Have I miss something or compiler setup when I change my Delphi 2010 to Delphi 10?
Rem: I have tested also a second way to find the number of local IP but same result (0) using Delphi 10
Code: ...
LList := TIdStackLocalAddressList.Create;
try
GStack.GetLocalAddressList(LList);
Memo1.Lines.Add(Format('nbr of local IP found: %d ', [LList.Count]));
...
Result is 0 using Delphi 10
Can someone tell me where I miss something?
Thank you.
|
|
|
|