Homec4science

WebSearch: optional refersto/citedby record limit

Authored by Federico Poli <federico.poli@cern.ch> on May 13 2014, 16:20.

Description

WebSearch: optional refersto/citedby record limit

  • Adds optional record limit to refersto/citedby and similar second order operators, preventing possible DoS kind of attacks (e.g. when refersto:year:0->9999). (PR #2711)
  • Adds configuration variable CFG_WEBSEARCH_MAX_RECORDS_REFERSTO and CFG_WEBSEARCH_MAX_RECORDS_CITEDBY.
  • Limits result used by 'refersto', 'referstoexcludingselfcites' to CFG_WEBSEARCH_MAX_RECORDS_REFERSTO.
  • Limits result used by 'citedby', 'citedbyexcludingselfcites' to CFG_WEBSEARCH_MAX_RECORDS_CITEDBY.
  • Adds classes 'InvenioWebSearchReferstoLimitError' and 'InvenioWebSearchCitedbyLimitError'.
  • Adds warning messages when the limit CFG_WEBSEARCH_MAX_RECORDS_* is reached.
  • In BibRank adds 'record_limit' parameter to 'get_refersto_by_list', 'get_refersto_hitset', 'get_cited_by_list', 'get_citedby_hitset' (default to None).
  • Adds regression test for the query 'refersto:year:2000'.

Signed-off-by: Federico Poli <federico.poli@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>

Details

Committed
Tibor Simko <tibor.simko@cern.ch>Jan 29 2015, 14:49
Parents
R3600:34f63332d6cb: mailutils: better email header type detection
Branches
Unknown
Tags
Unknown

Event Timeline

Tibor Simko <tibor.simko@cern.ch> committed R3600:e7160f858861: WebSearch: optional refersto/citedby record limit (authored by Federico Poli <federico.poli@cern.ch>).Jan 29 2015, 14:49