Socket
Socket
Sign inDemoInstall

strapi-utils

Package Overview
Dependencies
6
Maintainers
8
Versions
282
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.4.1 to 3.4.2

10

lib/build-query.js

@@ -149,5 +149,13 @@ 'use strict';

normalizedClauses.forEach(({ field }) => {
if (field.includes('.')) {
const fieldDepth = field.split('.').length - 1;
if (fieldDepth === 1) {
// Check if the relational field exists
getAssociationFromFieldKey({ model, field });
} else if (fieldDepth > 1) {
const err = new Error(
`Sorting on ${field} is not possible: you cannot sort at a depth greater than 1`
);
err.status = 400;
throw err;
}

@@ -154,0 +162,0 @@ });

2

lib/content-types.js

@@ -95,3 +95,3 @@ 'use strict';

const isPrivateAttribute = (model = {}, attributeName) => {
return model.privateAttributes.includes(attributeName);
return model && model.privateAttributes && model.privateAttributes.includes(attributeName);
};

@@ -98,0 +98,0 @@

{
"name": "strapi-utils",
"version": "3.4.1",
"version": "3.4.2",
"description": "Shared utilities for the Strapi packages",

@@ -19,3 +19,3 @@ "homepage": "http://strapi.io",

"date-fns": "^2.8.1",
"lodash": "4.17.19",
"lodash": "4.17.20",
"pino": "^4.7.1",

@@ -49,3 +49,3 @@ "pluralize": "^8.0.0",

"license": "SEE LICENSE IN LICENSE",
"gitHead": "8b9c3f2052ba449c653a9c4b90bdf09f98cf477d"
"gitHead": "7505de6ad9736f89002e4642ceb506e5669ec179"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc