-
Notifications
You must be signed in to change notification settings - Fork 6
Fix sse size mismatch 15094702859884413816 #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TheSpaceGod
wants to merge
30
commits into
nextcloud:main
Choose a base branch
from
TheSpaceGod:fix-sse-size-mismatch-15094702859884413816
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix sse size mismatch 15094702859884413816 #216
TheSpaceGod
wants to merge
30
commits into
nextcloud:main
from
TheSpaceGod:fix-sse-size-mismatch-15094702859884413816
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/` including `debug_sizes.php`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/` including extensive size debugging tools. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans, and correctly handle single file inputs. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans, and correctly handle single file inputs. - Updated `LangRopeService` to wrap the content stream in a Guzzle `FnStream` and override the `getSize()` method to return the logical size. This ensures Guzzle calculates the correct `Content-Length` for the multipart request body, preventing `cURL error 26` (EOF fail) caused by `fstat` returning the encrypted size. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added robust reproduction scripts in `tests/reproduction/` including encryption verification and size debugging. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans, and correctly handle single file inputs. - Updated `LangRopeService` to wrap the content stream in a Guzzle `FnStream` and override the `getSize()` method to return the logical size. This ensures Guzzle calculates the correct `Content-Length` for the multipart request body, preventing `cURL error 26` (EOF fail) caused by `fstat` returning the encrypted size. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added robust reproduction scripts in `tests/reproduction/` including encryption verification and size debugging. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans, and correctly handle single file inputs. - Updated `LangRopeService` to wrap the content stream in a Guzzle `FnStream` and override the `getSize()` method to return the logical size. This ensures Guzzle calculates the correct `Content-Length` for the multipart request body, preventing `cURL error 26` (EOF fail) caused by `fstat` returning the encrypted size. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added robust reproduction scripts in `tests/reproduction/` including encryption verification and size debugging. Co-authored-by: TheSpaceGod <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes cURL Error 26 (SSE Size Mismatch) in Nextcloud Context Chat.
When SSE is enabled,
fstat()on a file handle returns the encrypted size, while reading the stream returns the decrypted content. This mismatch caused uploads to fail withcURL error 26because Guzzle usesfstatto calculate the requestContent-Length.This fix:
$file->getSize()) to theSourceobject.LangRopeService, wraps the file stream in a GuzzleFnStreamand overridesgetSize()to return the correct decrypted size. This forces Guzzle to advertise the correct length, matching the data streamed.Includes comprehensive reproduction scripts validating the fix against Nextcloud VFS encryption.
Test output before on commit: [f7c85cd]
Test output after on commit: [f7c85cd]