Project

General

Profile

Bug #5931

Api does not fail on bad JSON

Added by François ARMAND about 4 years ago. Updated 10 months ago.

Status:
Released
Priority:
3
Category:
API
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
28

Description

The Rudder API does not fail when you give it a bad formatted JSON.

The result is that we are thinking it's not a JSON request, and try to parse it as "normal" -d parameters, and don't find anything relevant, so we don't change anything.

This make testing and undertanding API usage extremelly infuriating.


Related issues

Related to Rudder - Bug #5786: You cannot pass 'include' / 'exclude' targets as json for Rule API Released2014-11-19

Associated revisions

Revision 958bfa04 (diff)
Added by François ARMAND 10 months ago

Fixes #5931: Api does not fail on bad JSON

Revision e5158ef0 (diff)
Added by François ARMAND 10 months ago

Fixes #5931: Api does not fail on bad JSON

Revision 9d4e0925 (diff)
Added by François ARMAND 10 months ago

Fixes #5931: Api does not fail on bad JSON

History

#1 Updated by François ARMAND about 4 years ago

From a technical point of view, we are using lift JsonPost that takes in charge to checking if the parameter is valid json, and is not executed if not.

We should certainly use JsonReq like in http://exploring.liftweb.net/master/index-15.html, and check by ourselve if the JSON is correct.

#2 Updated by Vincent MEMBRÉ about 4 years ago

  • Target version changed from 2.10.8 to 2.10.9

#3 Updated by Vincent MEMBRÉ almost 4 years ago

  • Target version changed from 2.10.9 to 2.10.10

#4 Updated by Vincent MEMBRÉ almost 4 years ago

  • Target version changed from 2.10.10 to 2.10.11

#5 Updated by Vincent MEMBRÉ almost 4 years ago

  • Target version changed from 2.10.11 to 2.10.12

#6 Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 2.10.12 to 2.10.13

#7 Updated by Benoît PECCATTE over 3 years ago

  • Status changed from 8 to New

#8 Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 2.10.13 to 2.10.14

#9 Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 2.10.14 to 2.10.15

#10 Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 2.10.15 to 2.10.16

#11 Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 2.10.16 to 2.10.17

#12 Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 2.10.17 to 2.10.18

#13 Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 2.10.18 to 2.10.19

#14 Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 2.10.19 to 2.10.20

#15 Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 2.10.20 to 277

#16 Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 277 to 2.11.18

#17 Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 2.11.18 to 2.11.19

#18 Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 2.11.19 to 2.11.20

#19 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 2.11.20 to 2.11.21

#20 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 2.11.21 to 2.11.22

#21 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 2.11.22 to 2.11.23

#22 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 2.11.23 to 2.11.24

#23 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 2.11.24 to 308

#24 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 308 to 3.1.14

#25 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.1.14 to 3.1.15

#26 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.1.15 to 3.1.16

#27 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.1.16 to 3.1.17

#28 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.1.17 to 3.1.18

#29 Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 3.1.18 to 3.1.19

#30 Updated by François ARMAND over 1 year ago

  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Priority set to 0

#31 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.19 to 3.1.20

#32 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.20 to 3.1.21

#33 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.21 to 3.1.22

#34 Updated by Benoît PECCATTE over 1 year ago

  • Priority changed from 0 to 14

#35 Updated by Benoît PECCATTE over 1 year ago

  • Priority changed from 14 to 27

#36 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.22 to 3.1.23

#37 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.23 to 3.1.24

#38 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 3.1.24 to 3.1.25

#39 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 3.1.25 to 387

#40 Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 387 to 4.1.10

#41 Updated by François ARMAND 10 months ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
  • Priority changed from 27 to 28

#42 Updated by François ARMAND 10 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/1856

#43 Updated by Normation Quality Assistant 10 months ago

  • Assignee changed from Vincent MEMBRÉ to François ARMAND

#44 Updated by François ARMAND 10 months ago

  • Status changed from Pending technical review to Pending release

#46 Updated by Vincent MEMBRÉ 10 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.10 and 4.2.4 which were released today.

Also available in: Atom PDF