added SYSOBJ check to the PostProcedure service to prevent invalid procedures from getting posted to the procedure queue

This commit is contained in:
Infineon\StieberD
2025-07-29 11:54:53 -07:00
parent 4eee1b0f0a
commit 0f0c735023
2 changed files with 19 additions and 11 deletions

View File

@ -346,6 +346,11 @@ Service PostProcedure(ProcedureName, Params)
ErrorMsg = ''
If (ProcedureName NE '') then
ProcedureName = UCase(ProcedureName)
LSL2Key = '$':ProcedureName:'*LSL2'
FrameworksKey = '$':ProcedureName:'*FRAMEWORKS'
SysprogKey = '$':ProcedureName
If ( RowExists('SYSOBJ', LSL2Key) or RowExists('SYSOBJ', FrameworksKey) or RowExists('SYSOBJ', SysprogKey) ) then
RequestKeyID = RTI_CreateGUID()
RequestRow = ''
RequestRow<PROC_QUEUE.PROC_NAME$> = ProcedureName
@ -358,6 +363,9 @@ Service PostProcedure(ProcedureName, Params)
end else
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
end
end else
ErrorMsg = 'Error in ':Service:' service. PROC_NAME ':Quote(ProcedureName):' does not exist.'
end
end else
ErrorMsg = 'Error in ':Service:' service. Null ProcedureName passed in.'
end

View File

@ -164,7 +164,7 @@ WRITE_RECORD:
MetrologyID = Field(Name, '*', 1)
RDSNo = Xlate('RDS_TEST', MetrologyID, RDS_TEST_RDS_NO$, 'X')
Service_Services('PostProcedure', 'RDS_Services', 'AllTWUseSigned':SD$:RDSNo)
Service_Services('PostProcedure', 'RDS_SERVICES', 'AllTWUseSigned':SD$:RDSNo)
end
return