Skip to content

Object with attribute named "url" is not save if the value has not a string #3569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
paulovitin opened this issue Feb 25, 2017 · 1 comment
Closed

Comments

@paulovitin
Copy link
Contributor

paulovitin commented Feb 25, 2017

Issue Description

If you try to create an Object with an attribute named "url" and the value of this attribute is not a "string" the LoggerController throw an error

Steps to reproduce

Try create a Object with this structure

{
  "url": ["https://github.com", "https://google.com"],
}

Expected Results

Create the object with success

Actual Outcome

{"code":1,"message":"Internal server error."}

Environment Setup

  • Server

    • parse-server version: 2.3.5
    • Operating System: Ubuntu 14.04
    • Localhost or remote server?: Heroku
  • Database

    • PostgreSQL version: 9.6
    • Localhost or remote server?: Heroku

Logs/Trace

TypeError: Parameter "url" must be a string, not object
Url.parse (url.js:87:11)
Object.urlParse [as parse] (url.js:81:5)
LoggerController.maskSensitiveUrl (/app/node_modules/parse-server/lib/Controllers/LoggerController.js:58:36)
/app/node_modules/parse-server/lib/Controllers/LoggerController.js:82:26
Array.map (native)
LoggerController.maskSensitive (/app/node_modules/parse-server/lib/Controllers/LoggerController.js:70:23)
LoggerController.log (/app/node_modules/parse-server/lib/Controllers/LoggerController.js:122:19)
LoggerController.debug (/app/node_modules/parse-server/lib/Controllers/LoggerController.js:149:19)
debug (/app/node_modules/parse-server/lib/Adapters/Storage/Postgres/PostgresStorageAdapter.js:43:13)
PostgresStorageAdapter.createObject (/app/node_modules/parse-server/lib/Adapters/Storage/Postgres/PostgresStorageAdapter.js:764:7)
/app/node_modules/parse-server/lib/Controllers/DatabaseController.js:635:29
process._tickDomainCallback (internal/process/next_tick.js:129:7)
@natanrolnik
Copy link
Contributor

Closing this as #3571 was just merged. Thanks for your contribution, @paulovitin 🇧🇷

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

No branches or pull requests

2 participants