Skip to content

Conversation

@jplitza
Copy link

@jplitza jplitza commented Nov 1, 2019

  • Fixes query string building (handles & correctly)
  • Allow to pass additional params
  • Also convert forcedisplay values to field IDs

Example query that is now possible:

glpi.search_engine('computer', { "criteria": [{'field': 'name', 'value': 'noc'}], 'range': '0-0', 'uid_cols': True, 'forcedisplay': ['serial']})

Jan-Philipp Litza added 4 commits November 1, 2019 16:38
The manual approach was vulnerable to injection of & and thus additional
parameters
We simply pass through everything that isn't the "criteria" parameter.

This allows for specifying the range an other parameters of the search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant