Skip to content

Commit f3c3bcf

Browse files
committed
replaces the falsy check with a strict own-property check
1. Inherited properties (toString, constructor, __proto__) from being treated as valid vhost entries 2. The unvalidated dynamic method call warning, since we now explicitly verify the key is an own property of the configuration object before invoking it
1 parent 0750a52 commit f3c3bcf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/handler/src/handlerMain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class LemonldapNGHandler extends HandlerInit {
254254
) {
255255
return new Promise<boolean>((resolve, reject) => {
256256
const vhost = this.resolveAlias(req);
257-
if (!this.tsv.defaultCondition[vhost]) {
257+
if (!Object.prototype.hasOwnProperty.call(this.tsv.defaultCondition, vhost)) {
258258
return reject(
259259
`No configuration found for ${vhost} (or not listed in Node.js virtualHosts)`,
260260
);

0 commit comments

Comments
 (0)