Project

General

Profile

Actions

Bug #21926

closed

Error when trying to set default value without quotes for 404 error

Added by Elaad FURREEDAN almost 2 years ago. Updated over 1 year ago.

Status:
Released
Priority:
N/A
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

When we chose to set a default value when there is 404 error, if you chose to put a string without quotes (I.e toto) , an exception is raised.

[2022-08-09 23:43:48+0200] ERROR net.liftweb.http.LiftRules - Exception being returned to browser when processing /secure/api/datasources
net.liftweb.json.JsonParser$ParseException: expected boolean
Near: tot
    at net.liftweb.json.JsonParser$Parser.fail(JsonParser.scala:285)
    at net.liftweb.json.JsonParser$Parser.nextToken(JsonParser.scala:352)
    at net.liftweb.json.JsonParser$.$anonfun$astParser$1(JsonParser.scala:227)
    at net.liftweb.json.JsonParser$.parse(JsonParser.scala:82)
    at net.liftweb.json.JsonParser$.parse(JsonParser.scala:47)
    at net.liftweb.json.package$.parse(package.scala:40)
    at com.normation.plugins.datasources.DataSourceJsonSerializer$.serialize(Serialization.scala:103)
    at com.normation.plugins.datasources.DataSourceJdbcRepository.save(Repository.scala:418)
    at com.normation.plugins.datasources.DataSourceRepoImpl.save(Repository.scala:274)
    at com.normation.plugins.datasources.api.DataSourceApiImpl$CreateDataSource$.$anonfun$process0$8(DataSourceApiImpl.scala:270)
    at net.liftweb.common.Full.flatMap(Box.scala:858)
    at com.normation.plugins.datasources.api.DataSourceApiImpl$CreateDataSource$.$anonfun$process0$7(DataSourceApiImpl.scala:269)
    at net.liftweb.common.Full.flatMap(Box.scala:858)

With double quotes (I.e "toto") everything is working fine

Actions #1

Updated by Elaad FURREEDAN almost 2 years ago

  • Status changed from New to In progress
Actions #4

Updated by Elaad FURREEDAN almost 2 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Elaad FURREEDAN to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder-plugins/pull/507
Actions #5

Updated by Anonymous almost 2 years ago

  • Status changed from Pending technical review to Pending release
Actions #6

Updated by Vincent MEMBRÉ over 1 year ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder plugin datasources v7.2.1-2.2

Actions

Also available in: Atom PDF