[PR #13610] Fix: prevent path disclosure in error messages for invalid digests (issue #13223) #60990

Open
opened 2026-04-29 16:04:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13610
Author: @ylwango613
Created: 1/3/2026
Status: 🔄 Open

Base: mainHead: Fix_PathDisclosion


📝 Commits (1)

  • 7786e9d fix: prevent path disclosure in error messages for invalid digests

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 server/create.go (+9 -0)

📄 Description

Fixed issues caused by user-provided malformed digest parameters:

  1. If the digest is empty, return an "invalid empty digest" error immediately
  2. If the digest is a valid checksum format but the file path doesn't exist,
    strip the file path from error messages before returning to the client

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/13610 **Author:** [@ylwango613](https://github.com/ylwango613) **Created:** 1/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `Fix_PathDisclosion` --- ### 📝 Commits (1) - [`7786e9d`](https://github.com/ollama/ollama/commit/7786e9df8bd7fe7a7a959865ac987592ea2fe3af) fix: prevent path disclosure in error messages for invalid digests ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/create.go` (+9 -0) </details> ### 📄 Description Fixed issues caused by user-provided malformed digest parameters: 1. If the digest is empty, return an "invalid empty digest" error immediately 2. If the digest is a valid checksum format but the file path doesn't exist, strip the file path from error messages before returning to the client --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 16:04:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#60990