New params in TPT query to indicate #137
New params in TPT query to indicate #137hujambo-dunia wants to merge 2 commits intogalaxyproject:mainfrom
Conversation
| @@ -4760,16 +4770,24 @@ query_tpt-tool-cpu() { ##? [--startyear=<YYYY>] [--endyear=<YYYY>] [--formula=av | |||
| sql_formula="SUM" | |||
This is not a priority. This project will probably never add anything to prevent SQL injection outside of common sense checks on input. See e.g. Admins installing gxadmin should understand that they're granting read write database access to anyone with gxadmin access. You could setup a separate role that e.g. restricts table access. If SQL injection is a concern, then I strongly recommend doing this. A read-only DB account will prevent a lot of issues. I think EU is currently the only place granting a select group of users the ability to run gxadmin just for statistics queries, but there I believe they use read-only access (right @mira-miracoli ?)
I'm not sure there is a more elegant way, but the current changes are hmm. It's not my query so I won't push back too hard, but, providing extra bits of sql in this way is not a very user friendly or ergonomic design. You're also hitting the limits of our argument parsing library there. The We only have one other function that accepts arbitrary numbers of arguments but it's function signature is much simpler. I'd honestly suggest maybe separate queries per metric, or a single query with an optional For design inspiration you could look at the |
|
@hexylena Yes, in EU a select group of users can log-in as a specific Linux user that has read-only access to the database, so their gxadmin calls cannot alter the database contents. |
Few questions for us to ponder:
arrSelect1andarrWhere1(JSON, multidimensional array, etc)?