File tree Expand file tree Collapse file tree 10 files changed +42
-23
lines changed Expand file tree Collapse file tree 10 files changed +42
-23
lines changed Original file line number Diff line number Diff line change 88 build :
99 runs-on : ubuntu-latest
1010 steps :
11- - uses : actions/checkout@v2
12- - uses : actions/setup-node@v1
11+ - uses : actions/checkout@v4
12+ - uses : actions/setup-node@v4
1313 with :
14- node-version : " 16 .x"
14+ node-version : " 22 .x"
1515 - run : npm install
1616
1717 - name : get-package-details
2828 tag_prefix : " v"
2929 - name : Create Release
3030 if : steps.update_tag.outputs.tagname
31- uses : actions/create-release@v1
31+ uses : actions/create-release@v4
3232 id : create_release
3333 env :
3434 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
4040 - name : Upload Release Asset
4141 if : steps.update_tag.outputs.tagname
4242 id : upload-release-asset
43- uses : actions/upload-release-asset@v1
43+ uses : actions/upload-release-asset@v4
4444 env :
4545 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4646 with :
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Contentstack is a headless CMS with an API-first approach. It is a CMS that deve
88
99### Prerequisite
1010
11- - Nodejs, v8 +
11+ - Nodejs, v20 +
1212- MongoDB, v3.6 or higher
1313- You should have the data synced through [ Contentstack DataSync] ( https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync )
1414
Original file line number Diff line number Diff line change 44 < meta charset ="utf-8 ">
55 < title > JSDoc: Global</ title >
66
7- < script src ="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js "> </ script >
8- < script src ="scripts/prettify/lang-css.js "> </ script >
7+ < script src ="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js " integrity =" coVkbqHWSAomtcPWb3XtrGNqZkue+Eu9X7YxIgZbtmg=% " crossorigin =" anonymous " > </ script >
8+ < script src ="scripts/prettify/lang-css.js " integrity =" m2rEgwM7AlcnFOtNN+4ZkYXEEAjrKz9GoAqw685qIMU=% " crossorigin =" anonymous " > </ script >
99 <!--[if lt IE 9]>
1010 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js" integrity="sha384-hDHlUtmnjnJimeAhT+DpLqjLdp8vFgSFHhZO1zq2EtqpwFsNM7H5cpSUYqT1Uh2E" crossorigin="anonymous"></script>
1111 <![endif]-->
@@ -7515,6 +7515,6 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="global.ht
75157515</ footer >
75167516
75177517< script > prettyPrint ( ) ; </ script >
7518- < script src ="scripts/linenumber.js "> </ script >
7518+ < script src ="scripts/linenumber.js " integrity =" gjKEaAtJoBN94tFHTJO/QMWm2iZN7DSXY/EAGrHzx30=% " crossorigin =" anonymous " > </ script >
75197519</ body >
75207520</ html >
Original file line number Diff line number Diff line change 10651065</footer>
10661066
10671067<script> prettyPrint(); </script>
1068- <script src="scripts/linenumber.js"> </script>
1068+ <script src="scripts/linenumber.js" integrity="gjKEaAtJoBN94tFHTJO/QMWm2iZN7DSXY/EAGrHzx30=%" crossorigin="anonymous" > </script>
10691069</body>
10701070</html>
Original file line number Diff line number Diff line change @@ -286,6 +286,6 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="global.ht
286286</ footer >
287287
288288< script > prettyPrint ( ) ; </ script >
289- < script src ="scripts/linenumber.js "> </ script >
289+ < script src ="scripts/linenumber.js " integrity =" gjKEaAtJoBN94tFHTJO/QMWm2iZN7DSXY/EAGrHzx30=% " crossorigin =" anonymous " > </ script >
290290</ body >
291291</ html >
Original file line number Diff line number Diff line change @@ -87,6 +87,6 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="global.ht
8787</ footer >
8888
8989< script > prettyPrint ( ) ; </ script >
90- < script src ="scripts/linenumber.js "> </ script >
90+ < script src ="scripts/linenumber.js " integrity =" gjKEaAtJoBN94tFHTJO/QMWm2iZN7DSXY/EAGrHzx30=% " crossorigin =" anonymous " > </ script >
9191</ body >
9292</ html >
Original file line number Diff line number Diff line change @@ -2239,6 +2239,6 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="global.ht
22392239</ footer >
22402240
22412241< script > prettyPrint ( ) ; </ script >
2242- < script src ="scripts/linenumber.js "> </ script >
2242+ < script src ="scripts/linenumber.js " integrity =" gjKEaAtJoBN94tFHTJO/QMWm2iZN7DSXY/EAGrHzx30=% " crossorigin =" anonymous " > </ script >
22432243</ body >
22442244</ html >
Original file line number Diff line number Diff line change 11{
22 "author" :
" Contentstack Ecosystem <[email protected] >" ,
33 "name" : " datasync-mongodb-sdk" ,
4- "version" : " 1.0.8 " ,
4+ "version" : " 1.0.9 " ,
55 "description" : " Mongodb query wrapper around contents synced via @contentstack/content-store-mongodb" ,
66 "main" : " dist/index.js" ,
77 "scripts" : {
Original file line number Diff line number Diff line change @@ -2391,19 +2391,38 @@ export class Stack {
23912391 }
23922392
23932393 private sanitizeIQuery ( query : IQuery ) : boolean {
2394+ const allowedKeys = {
2395+ _content_type_uid : 'string' ,
2396+ uid : 'string' ,
2397+ _version : {
2398+ $exists : 'boolean'
2399+ } ,
2400+ locale : 'string'
2401+ } ;
2402+
2403+ const validateObject = ( obj : any , schema : any ) : boolean => {
2404+ for ( const key in obj ) {
2405+ if ( ! schema . hasOwnProperty ( key ) ) {
2406+ return false ;
2407+ }
2408+ if ( typeof schema [ key ] === 'object' ) {
2409+ if ( ! validateObject ( obj [ key ] , schema [ key ] ) ) {
2410+ return false ;
2411+ }
2412+ } else if ( typeof obj [ key ] !== schema [ key ] ) {
2413+ return false ;
2414+ }
2415+ }
2416+ return true ;
2417+ } ;
23942418 if ( ! query || typeof query !== 'object' || Array . isArray ( query ) ) {
23952419 return false ;
23962420 }
2397- if ( ! query || ! Array . isArray ( query . $or ) ) {
2421+ if ( ! query . $or || ! Array . isArray ( query . $or ) ) {
23982422 return false ;
23992423 }
24002424 for ( const item of query . $or ) {
2401- if (
2402- typeof item . _content_type_uid !== 'string' ||
2403- typeof item . uid !== 'string' ||
2404- ( item . _version && typeof item . _version . $exists !== 'boolean' ) ||
2405- ( item . locale && typeof item . locale !== 'string' )
2406- ) {
2425+ if ( ! validateObject ( item , allowedKeys ) ) {
24072426 return false ;
24082427 }
24092428 }
You can’t perform that action at this time.
0 commit comments