airqo-platform / airqo-platform/AirQo-api

Inconsistent Model Initialization in UnknownIP Model

Open
#3,921 0 comments 0 reactions 1 assignee Claimed by @Baalmart View on GitHub
Dominant language
JavaScript
Stars
26
Forks
24
Avg merge
5h 36m
Merged PRs (30d)
81

Description

An inconsistency has been identified in the model initialization within `src/auth-service/models/UnknownIP.js`. The file uses both `getModelByTenant(dbTenant, "UnknownIP", UnknownIPSchema)` and direct mongoose model initialization with `mongoose.model("UnknownIPs")`, which could lead to tenant isolation issues.\n\nPR URL: https://github.com/airqo-platform/AirQo-api/pull/3919\nComment URL: https://github.com/airqo-platform/AirQo-api/pull/3919#discussion_r1857373937\n\nRequested by @Baalmart.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.