Skip to content

Admin passthrough removal#103

Merged
Bryan Malumphy (bmalumphy) merged 3 commits intomainfrom
bugfix/admin-passthrough
Jan 15, 2026
Merged

Admin passthrough removal#103
Bryan Malumphy (bmalumphy) merged 3 commits intomainfrom
bugfix/admin-passthrough

Conversation

@bmalumphy
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 15, 2026

🟢 Test Coverage Report - @dittolive/ditto-chat-core

Overall Coverage: 88.31%

Metric Coverage Status
🟢 Lines 87.35% green
🟢 Statements 87.35% green
🟢 Functions 92.45% green
🟢 Branches 86.1% green

📊 View Detailed Coverage Report

ℹ️ Coverage Thresholds
  • 🟢 Excellent (≥ 80%)
  • 🟡 Good (60-79%)
  • 🟠 Fair (40-59%)
  • 🔴 Poor (< 40%)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 15, 2026

🟢 Test Coverage Report - @dittolive/ditto-chat-ui

Overall Coverage: 89.68%

Metric Coverage Status
🟢 Lines 92.05% green
🟢 Statements 92.05% green
🟢 Functions 85.98% green
🟢 Branches 88.64% green

📊 View Detailed Coverage Report

ℹ️ Coverage Thresholds
  • 🟢 Excellent (≥ 80%)
  • 🟡 Good (60-79%)
  • 🟠 Fair (40-59%)
  • 🔴 Poor (< 40%)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 15, 2026

⚠️ OWASP Dependency Check - @dittolive/ditto-chat-core

Medium severity vulnerabilities detected

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 1
🔵 Low 0
Total 1

📋 Vulnerability Details

  • CVE-2025-64718 (MEDIUM) in js-yaml:3.14.2
    • Description: js-yaml is a JavaScript YAML parser and dumper. In js-yaml 4.1.0 and below, it's possible for an attacker to modify the prototype of the result of a parsed yaml document via prototype pollution ( proto ). All users who parse untrusted yaml documents may be impacted. The problem is patched in js-yaml 4.1.1. Users can protect against this kind of attack on the server by using node --disable-proto=delete or deno (in Deno, pollution protection is on by default).
    • CVSS: 5.3

📊 View Full HTML Report

ℹ️ How to fix vulnerabilities
  1. Update vulnerable dependencies to patched versions
  2. Run npm audit fix or npm audit fix --force in the root directory
  3. Check for alternative packages if updates aren't available
  4. Review and update your package.json and package-lock.json

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 15, 2026

⚠️ OWASP Dependency Check - @dittolive/ditto-chat-ui

Medium severity vulnerabilities detected

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 1
🔵 Low 0
Total 1

📋 Vulnerability Details

  • CVE-2025-64718 (MEDIUM) in js-yaml:3.14.2
    • Description: js-yaml is a JavaScript YAML parser and dumper. In js-yaml 4.1.0 and below, it's possible for an attacker to modify the prototype of the result of a parsed yaml document via prototype pollution ( proto ). All users who parse untrusted yaml documents may be impacted. The problem is patched in js-yaml 4.1.1. Users can protect against this kind of attack on the server by using node --disable-proto=delete or deno (in Deno, pollution protection is on by default).
    • CVSS: 5.3

📊 View Full HTML Report

ℹ️ How to fix vulnerabilities
  1. Update vulnerable dependencies to patched versions
  2. Run npm audit fix or npm audit fix --force in the root directory
  3. Check for alternative packages if updates aren't available
  4. Review and update your package.json and package-lock.json

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing

Comment on lines +147 to +152
func getAdminAccess(email: String) async throws -> Bool {
return try await p2pStore.ditto.store.execute(
query: "SELECT * FROM `roles` WHERE email = :email",
arguments: ["email": email]
).items.count > 0
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want this to be an observer so then someone does not have to kill the app and load it again if they get admin access added to their account.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we will need the roles collection to have a subscription set up. That may already be done somewhere else

return !roles.isEmpty
}
private var rolesCancellable: AnyCancellable?
private var roles: [AdminRole] = []
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to be published

@bmalumphy Bryan Malumphy (bmalumphy) merged commit 4787e8a into main Jan 15, 2026
5 checks passed
@bmalumphy Bryan Malumphy (bmalumphy) deleted the bugfix/admin-passthrough branch January 15, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants