Skip to content
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

failed to decode param #4954

Closed
exomarty opened this issue Aug 16, 2016 · 6 comments
Closed

failed to decode param #4954

exomarty opened this issue Aug 16, 2016 · 6 comments
Assignees
Labels
Milestone

Comments

@exomarty
Copy link

exomarty commented Aug 16, 2016

Please include the following information when submitting a bug report/issue:

  • NodeBB 1.1.2
  • Database (mongo or redis) and it's version. mongo

some random error log
seems to hapen on topic with punctuation and special characters

16/8 08:22 [30950] - �[31merror�[39m: /topic/23786/no-dec%EDais-que-zaza-no-marc%F3-el-penalti
 URIError: Failed to decode param 'no-dec%EDais-que-zaza-no-marc%F3-el-penalti'
    at decodeURIComponent (native)
    at decode_param (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:167:12)
    at Layer.match (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:143:15)
    at matchLayer (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:557:18)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:216:15)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:312:13)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:330:12)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:271:10)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:618:15
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:256:14)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
16/8 09:39 [30948] - �[31merror�[39m: /topic/11430/hilo-de-canciones-de-rocks-no-m%F3viles
 URIError: Failed to decode param 'hilo-de-canciones-de-rocks-no-m%F3viles'
    at decodeURIComponent (native)
    at decode_param (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:167:12)
    at Layer.match (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:143:15)
    at matchLayer (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:557:18)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:216:15)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:312:13)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:330:12)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:271:10)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:618:15
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:256:14)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
16/8 10:01 [30950] - �[31merror�[39m: /topic/13502/cre%E9is-que-este-es-el-futuro-de-la-realidad-virtual
 URIError: Failed to decode param 'cre%E9is-que-este-es-el-futuro-de-la-realidad-virtual'
    at decodeURIComponent (native)
    at decode_param (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:167:12)
    at Layer.match (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:143:15)
    at matchLayer (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:557:18)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:216:15)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:312:13)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:330:12)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:271:10)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:618:15
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:256:14)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
16/8 11:26 [30950] - �[31merror�[39m: /topic/22959/ataque-epil%E9ptico
 URIError: Failed to decode param 'ataque-epil%E9ptico'
    at decodeURIComponent (native)
    at decode_param (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:167:12)
    at Layer.match (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:143:15)
    at matchLayer (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:557:18)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:216:15)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:312:13)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:330:12)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:271:10)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:618:15
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:256:14)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
16/8 15:25 [30954] - �[31merror�[39m: /topic/18182/p%E1gina-web-para-envolver-regalos-de-forma-original
 URIError: Failed to decode param 'p%E1gina-web-para-envolver-regalos-de-forma-original'
    at decodeURIComponent (native)
    at decode_param (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:167:12)
    at Layer.match (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:143:15)
    at matchLayer (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:557:18)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:216:15)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:312:13)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:330:12)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:271:10)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:618:15
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:256:14)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
16/8 15:53 [30950] - �[31merror�[39m: /topic/23691/qu%E9-calor-en-arizona
 URIError: Failed to decode param 'qu%E9-calor-en-arizona'
    at decodeURIComponent (native)
    at decode_param (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:167:12)
    at Layer.match (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:143:15)
    at matchLayer (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:557:18)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:216:15)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:312:13)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:330:12)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:271:10)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:618:15
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:256:14)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
16/8 15:59 [30954] - �[31merror�[39m: /topic/23565/qu%E9-camino-tomar%EDas
 URIError: Failed to decode param 'qu%E9-camino-tomar%EDas'
    at decodeURIComponent (native)
    at decode_param (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:167:12)
    at Layer.match (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:143:15)
    at matchLayer (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:557:18)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:216:15)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/var/foroexodo/nodebb/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:312:13)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:330:12)
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:271:10)
    at /var/foroexodo/nodebb/node_modules/express/lib/router/index.js:618:15
    at next (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:256:14)
    at Function.handle (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:176:3)
    at router (/var/foroexodo/nodebb/node_modules/express/lib/router/index.js:46:12)

Thank you!

@julianlam
Copy link
Member

seems to hapen on topic with punctuation and special characters

Issue occurs because a topic is saved to the database without encoding (which is fine, as both Redis and MongoDB use UTF-8), but on some environments, of which I have not been able to determine, it encodes them incorrectly... as far as I can tell...

selection_079

In google chrome, the url is not escaped at all (since there's no reason for it to be):

selection_080

Perhaps a bad browser...

@julianlam
Copy link
Member

This issue needs more info as we have never been able to reproduce it organically. You can manually trigger it by inserting a malformed url, e.g. http://exo.do/topic/23565/qu%E9-camino-tomar%EDas

However, the processing itself has been marked wontfix by the express team.

@exomarty
Copy link
Author

Mmm maybe this topics were imported from vbulletin when we transfered to nodebb and url was bad parsed...
I dont mind to delete them but cant access :D

@exomarty
Copy link
Author

nervermind just noticed they are not that old

@exomarty
Copy link
Author

ok i understand now, then maybe if some robot trying to access to a bad url, not sure ...

@julianlam
Copy link
Member

Upstream issue: expressjs/express#2652

@julianlam julianlam self-assigned this Aug 18, 2016
@julianlam julianlam added the bug label Aug 18, 2016
@julianlam julianlam added this to the 1.2.0 milestone Aug 18, 2016
BenLubar added a commit to boomzillawtf/tdwtf that referenced this issue Aug 20, 2016
- Resolve two DoS attack vectors <NodeBB/NodeBB#4949>
- Fix the thing that caused 502s last time there was an update <NodeBB/NodeBB@3161879>
- Admins can now attack the tag cloud <NodeBB/NodeBB#4795>
- Logging in/out with multiple tabs open is less buggy <NodeBB/NodeBB#4950>
- Fixed the timestamp not being set on replies <NodeBB/NodeBB@3b0eca3>
- Fixed unnecessary page refresh when going to replied-to posts <NodeBB/NodeBB@9207d6a>
- Purged topics are removed from the followed topics set <NodeBB/NodeBB#4955>
- Fixed a bunch of unhandled errors <NodeBB/NodeBB#4951>
- Fixed breadcrumb for account info page <NodeBB/NodeBB#4958>
- Moved login session list to the account info page <NodeBB/NodeBB#4959> <NodeBB/nodebb-theme-persona#310>
- Got rid of error messages about malformed URLs in the server log <NodeBB/NodeBB#4954>
- **HEY GUYS they fixed "new posts made to topic" notifications going to the end of the topic** <NodeBB/NodeBB#4469>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants