-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
🔍 refactor: OpenID Fetch Handling and Logging #7790
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
Merged
Merged
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
- Added detailed logging for OpenID requests and responses when debug mode is enabled. - Introduced helper functions for safely logging sensitive data and headers. - Updated OpenID strategy to handle non-standard WWW-Authenticate headers in responses. - Refactored proxy configuration handling for improved clarity and logging.
- Updated the MemoryViewer component to conditionally apply justification styles based on memory data and access permissions. - Introduced utility function `cn` for cleaner class name management in the component.
- Introduced a new test suite for multer configuration, covering storage destination and filename generation. - Implemented tests for file filtering, ensuring only valid JSON files are accepted. - Added error handling tests for edge cases and vulnerabilities, including handling empty field names and malformed filenames. - Integrated real configuration testing with actual fileConfig and custom endpoints. - Enhanced UUID generation tests to ensure uniqueness and cryptographic security.
jmaddington
pushed a commit
to jmaddington/LibreChat
that referenced
this pull request
Jun 17, 2025
* feat: Enhance OpenID Strategy with Debug Logging and Header Management - Added detailed logging for OpenID requests and responses when debug mode is enabled. - Introduced helper functions for safely logging sensitive data and headers. - Updated OpenID strategy to handle non-standard WWW-Authenticate headers in responses. - Refactored proxy configuration handling for improved clarity and logging. * refactor: MemoryViewer Layout with Conditional Justification - Updated the MemoryViewer component to conditionally apply justification styles based on memory data and access permissions. - Introduced utility function `cn` for cleaner class name management in the component. * refactor: Update OpenID Strategy to use Global Fetch * refactor: Add undici for customFetch request handling in OpenID strategy * fix: Export 'files' module in utils index * chore: Add node-fetch dependency for openid image download * ci: Add comprehensive tests for multer configuration and file handling - Introduced a new test suite for multer configuration, covering storage destination and filename generation. - Implemented tests for file filtering, ensuring only valid JSON files are accepted. - Added error handling tests for edge cases and vulnerabilities, including handling empty field names and malformed filenames. - Integrated real configuration testing with actual fileConfig and custom endpoints. - Enhanced UUID generation tests to ensure uniqueness and cryptographic security. * chore: Improve proxy configuration logging in customFetch function * fix: Improve logging for non-standard WWW-Authenticate header in customFetch function
rhonyabdullah
pushed a commit
to rhonyabdullah/LibreChat
that referenced
this pull request
Jun 27, 2025
* feat: Enhance OpenID Strategy with Debug Logging and Header Management - Added detailed logging for OpenID requests and responses when debug mode is enabled. - Introduced helper functions for safely logging sensitive data and headers. - Updated OpenID strategy to handle non-standard WWW-Authenticate headers in responses. - Refactored proxy configuration handling for improved clarity and logging. * refactor: MemoryViewer Layout with Conditional Justification - Updated the MemoryViewer component to conditionally apply justification styles based on memory data and access permissions. - Introduced utility function `cn` for cleaner class name management in the component. * refactor: Update OpenID Strategy to use Global Fetch * refactor: Add undici for customFetch request handling in OpenID strategy * fix: Export 'files' module in utils index * chore: Add node-fetch dependency for openid image download * ci: Add comprehensive tests for multer configuration and file handling - Introduced a new test suite for multer configuration, covering storage destination and filename generation. - Implemented tests for file filtering, ensuring only valid JSON files are accepted. - Added error handling tests for edge cases and vulnerabilities, including handling empty field names and malformed filenames. - Integrated real configuration testing with actual fileConfig and custom endpoints. - Enhanced UUID generation tests to ensure uniqueness and cryptographic security. * chore: Improve proxy configuration logging in customFetch function * fix: Improve logging for non-standard WWW-Authenticate header in customFetch function
kenshinsamue
pushed a commit
to intelequia/LibreChat
that referenced
this pull request
Aug 4, 2025
* feat: Enhance OpenID Strategy with Debug Logging and Header Management - Added detailed logging for OpenID requests and responses when debug mode is enabled. - Introduced helper functions for safely logging sensitive data and headers. - Updated OpenID strategy to handle non-standard WWW-Authenticate headers in responses. - Refactored proxy configuration handling for improved clarity and logging. * refactor: MemoryViewer Layout with Conditional Justification - Updated the MemoryViewer component to conditionally apply justification styles based on memory data and access permissions. - Introduced utility function `cn` for cleaner class name management in the component. * refactor: Update OpenID Strategy to use Global Fetch * refactor: Add undici for customFetch request handling in OpenID strategy * fix: Export 'files' module in utils index * chore: Add node-fetch dependency for openid image download * ci: Add comprehensive tests for multer configuration and file handling - Introduced a new test suite for multer configuration, covering storage destination and filename generation. - Implemented tests for file filtering, ensuring only valid JSON files are accepted. - Added error handling tests for edge cases and vulnerabilities, including handling empty field names and malformed filenames. - Integrated real configuration testing with actual fileConfig and custom endpoints. - Enhanced UUID generation tests to ensure uniqueness and cryptographic security. * chore: Improve proxy configuration logging in customFetch function * fix: Improve logging for non-standard WWW-Authenticate header in customFetch function
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.
Summary
I enhanced the OpenID authentication strategy with advanced debug logging, improved proxy and header handling, and migrated its fetch logic to use undici for reliability and standards compliance.
safeStringify
andlogHeaders
to mask and safely serialize sensitive data, reused across logging operations.cn
utility for improved UX and style management.Other changes
I also exported the
files
module in the utils index to improve TypeScript module usability and coverage. Finally, I developed a comprehensive test suite covering multer file storage, filename generation, filtering logic, cryptographic UUIDs, edge case handling, and integration with real file configuration.files
module from utils/index.ts to fix missing export and support downstream usage.Relevant docs (also includes Memories changes): LibreChat-AI/librechat.ai#322
Change Type
Testing
The test suite for multer was run locally and via the CI pipeline using Jest and covers:
Test Configuration:
Checklist