CodeGenieApp / CodeGenieApp/serverless-express
Double encoding of query
- Lingua principale
- JavaScript
- Stelle
- 5.3k
- Fork
- 676
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
seems that query is encoded one more time when hitting express.
I had to add this peace of code before passing event to module:
```js
exports.handler = (event, context) => {
Object.keys(event.queryStringParameters).forEach((key) => {
// eslint-disable-next-line no-param-reassign
event.queryStringParameters[key] = decodeURIComponent(event.queryStringParameters[key]);
});
awsServerlessExpress.proxy(server, event, context);
};
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start with the handler workaround in the issue and trace how event.queryStringParameters reaches awsServerlessExpress.proxy. Reproduce a query containing encoded characters through the AWS serverless Express path, compare the value received by Express, and confirm that callers no longer need to decode parameters before invoking the proxy.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, express, javascript
- Ambito
- api, backend, cloud
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100