Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorCopilot <198982749+Copilot@users.noreply.github.com>2025-09-11 12:48:30 +0300
committerGitHub <noreply@github.com>2025-09-11 12:48:30 +0300
commit40b6d7707a8d7856eb97e00ea7c86052859ce162 (patch)
tree7988a2750eeaadac77d3f5e4529d97117e0dc434 /web
parentcbf316db31bac79f7d497ce92f8aa899f3f4de08 (diff)
Fix critical bugs in ObjectUtil.equals() and filterInbounds() functions (#3451)
* Initial plan * Fix ObjectUtil.equals asymmetric comparison and filterInbounds null pointer bugs Co-authored-by: MHSanaei <33454419+MHSanaei@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MHSanaei <33454419+MHSanaei@users.noreply.github.com>
Diffstat (limited to 'web')
-rw-r--r--web/assets/js/util/index.js8
-rw-r--r--web/html/inbounds.html12
2 files changed, 15 insertions, 5 deletions
diff --git a/web/assets/js/util/index.js b/web/assets/js/util/index.js
index 4bf760d7..bb47f538 100644
--- a/web/assets/js/util/index.js
+++ b/web/assets/js/util/index.js
@@ -326,6 +326,14 @@ class ObjectUtil {
return false;
}
}
+ for (const key in b) {
+ if (!b.hasOwnProperty(key)) {
+ continue;
+ }
+ if (!a.hasOwnProperty(key)) {
+ return false;
+ }
+ }
return true;
}
}
diff --git a/web/html/inbounds.html b/web/html/inbounds.html
index 830c940f..58a4e5a5 100644
--- a/web/html/inbounds.html
+++ b/web/html/inbounds.html
@@ -983,11 +983,13 @@
const list = this.clientCount[inbound.id][this.filterBy];
if (list.length > 0) {
const filteredSettings = { "clients": [] };
- inboundSettings.clients.forEach(client => {
- if (list.includes(client.email)) {
- filteredSettings.clients.push(client);
- }
- });
+ if (inboundSettings.clients) {
+ inboundSettings.clients.forEach(client => {
+ if (list.includes(client.email)) {
+ filteredSettings.clients.push(client);
+ }
+ });
+ }
newInbound.settings = Inbound.Settings.fromJson(inbound.protocol, filteredSettings);
this.searchedInbounds.push(newInbound);
}