Skip to content

Commit 1fb8882

Browse files
committed
Checkpoint
1 parent 526a8ef commit 1fb8882

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap/CDS.qll

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,21 @@ class ES6ApplicationServiceDefinition extends ClassNode, UserDefinedApplicationS
551551

552552
/**
553553
* Subclassing `cds.ApplicationService` via a call to `cds.service.impl`.
554-
* ```js
554+
* e.g.1. Given this code:
555+
* ``` javascript
555556
* const cds = require('@sap/cds')
556-
* module.exports = cds.service.impl (function() { ... })
557+
* module.exports = cds.service.impl (function() {
558+
* this.on("SomeEvent1", (req) => { ... })
559+
* })
560+
* ```
561+
* This class captures the call `cds.service.impl (function() { ... })`.
562+
*
563+
* e.g.2. Given this code:
564+
* ``` javascript
565+
* const cds = require('@sap/cds')
566+
* module.exports = cds.service.impl ((srv) => {
567+
* srv.on("SomeEvent1", (req) => { ... })
568+
* })
557569
* ```
558570
*/
559571
class ImplMethodCallApplicationServiceDefinition extends MethodCallNode,

javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap/RemoteFlowSources.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ class UserProvidedPropertyReadOfHandlerParameterOfExposedService extends RemoteF
5656

5757
UserProvidedPropertyReadOfHandlerParameterOfExposedService() {
5858
/* 1. `req.(data|params|headers|id)` */
59-
this = handlerParameterOfExposedService.getAPropertyRead(["data", "params", "headers", "id"])
59+
this =
60+
handlerParameterOfExposedService
61+
.getAPropertyRead(["data", "params", "headers", "id", "_queryOptions"])
6062
or
6163
/* 2. APIs stemming from `req.http.req`: Defined by Express.js */
6264
exists(PropRead reqHttpReq |

0 commit comments

Comments
 (0)