Repository navigation
GH Issue 1718: Lookup to a query in a parent folder contaminates the request's query environment container - #8177
Conversation
labkey-matthewb
left a comment
There was a problem hiding this comment.
This can't be the right fix. Unfortunately, I think we have to dig deeper and looks at who is overwriting the environment and why. Originally the query environment was only meant to support some context functions in LabKey SQL (userid, ismemberof, etc). Unfortunately, some developers have discovered this as a way to grab a container out of thin air (dangerous). Can we investigate why resolving a lookup calls setEnvirnment() and see if that can be removed?
|
Rationale
Fixes GH Issue 1718: resolving a lookup whose target query lives in another folder leaves the request's query environment container pointing at that folder. Compiling a query sets the thread-local environment container to the compiled query's own container and never puts it back, so everything that reads it later in the request resolves against the wrong folder. Custom compare types build their filter clauses from that value, which is how this surfaced in LIMS: a workflow job's sample type tab looked the job up in the parent folder, found nothing, and showed no samples.
Related Pull Requests
Changes