Skip to content

Commit

Permalink
- Correção de validação de DataRoute.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobius1qwe committed May 17, 2023
1 parent 7c80d13 commit 5bd8c76
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
18 changes: 12 additions & 6 deletions CORE/Source/Basic/uRESTDWBasic.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
XyberX (Gilberto Rocha) - Admin - Criador e Administrador do pacote.
Alexandre Abbade - Admin - Administrador do desenvolvimento de DEMOS, coordenador do Grupo.
Anderson Fiori - Admin - Gerencia de Organização dos Projetos
Flávio Motta - Member Tester and DEMO Developer.
Mobius One - Devel, Tester and Admin.
Gustavo - Criptografia and Devel.
Expand Down Expand Up @@ -2049,11 +2048,18 @@ procedure TRESTClientPoolerBase.SetIpVersion(IpV: TRESTDWClientIpVersions);

//
// DataRoute DR001
//
if (pos('/', cmd, 2) > 0) or (pos('\', cmd, 1) > 0) then
vDataRoute := Copy(cmd, 1, pos('/', cmd, 2));

if not vDataRouteList.RouteExists(vDataRoute) then vDataRoute := '';
// verifica o dataroute na URL do request: "cmd"
if vDataRouteList.Count > 0 then
begin
if (pos('/', cmd, 2) > 0) or (pos('\', cmd, 1) > 0) then
vDataRoute := Copy(cmd, 1, pos('/', cmd, 2));

if not vDataRouteList.RouteExists(vDataRoute) then
begin
WriteResponseText(cInvalidRequest, 400);
exit;
end;
end;

// DataRoute block

Expand Down
1 change: 0 additions & 1 deletion CORE/Source/Consts/uRESTDWConsts.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
XyberX (Gilberto Rocha) - Admin - Criador e Administrador do pacote.
Alexandre Abbade - Admin - Administrador do desenvolvimento de DEMOS, coordenador do Grupo.
Anderson Fiori - Admin - Gerencia de Organização dos Projetos
Flávio Motta - Member Tester and DEMO Developer.
Mobius One - Devel, Tester and Admin.
Gustavo - Criptografia and Devel.
Expand Down

0 comments on commit 5bd8c76

Please sign in to comment.