-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix: remove problematic redundant uuid conversion and add api input param validations to api server #2051
Merged
odilitime
merged 7 commits into
elizaOS:develop
from
jonathanykh:fix/remove-redundant-uuid-conversion
Jan 12, 2025
Merged
fix: remove problematic redundant uuid conversion and add api input param validations to api server #2051
odilitime
merged 7 commits into
elizaOS:develop
from
jonathanykh:fix/remove-redundant-uuid-conversion
Jan 12, 2025
Conversation
This file contains 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
Regarding testing, there is this simple Python script that I can provide to facilitate calls to the API server (normally at localhost:3000) and test the results of different inputs (e.g. invalid UUID):
|
Hello @jonathanykh could you update pnpm-lock.yaml |
…aram validations to api server
jonathanykh
force-pushed
the
fix/remove-redundant-uuid-conversion
branch
from
January 11, 2025 09:57
543121f
to
d71bad2
Compare
jonathanykh
force-pushed
the
fix/remove-redundant-uuid-conversion
branch
from
January 11, 2025 10:30
2e43930
to
77f0867
Compare
Thanks @tcm390, I have updated the pnpm-lock.yaml, please take a look! :) |
odilitime
approved these changes
Jan 12, 2025
mgunnin
added a commit
to mgunnin/eliza-agent
that referenced
this pull request
Jan 12, 2025
* main: (704 commits) bump version (elizaOS#2193) feat(security): Implement comprehensive file upload security measures - Add FileSecurityValidator, file type restrictions, size limits, path traversal prevention, enhanced logging and security documentation (elizaOS#1753) (elizaOS#1806) fix(client-twitter): clean up mention deduplication (elizaOS#2185) fix postgres adapter migration extension creation which already exists at this point (elizaOS#2188) Update types.ts fix json format typo fix quai deps fix path Add Persian README File chore: lint and fix pass on develop (elizaOS#2180) bump version to 0,1,8 bump clean up unused var in catch comment out unused AkashMessage interface bump eslint so it doesn't crash remove duplicate TOGETHER in case, lint/unused var convert imageDescriptionsArray from let to const per lint fix: Koloxarto/fix ragknowledge for postgres (elizaOS#2153) fix: fix the chat stuck in infinite loop (elizaOS#1755) fix: remove problematic redundant uuid conversion and add api input param validations to api server (elizaOS#2051) ...
0xpi-ai
pushed a commit
to 0xpi-ai/NayariAI
that referenced
this pull request
Jan 15, 2025
…aram validations to api server (elizaOS#2051) * fix: remove problematic redundant uuid conversion and add api input param validations to api server * style: use object property shorthand for roomId * chore: update pnpm-lock.yaml --------- Co-authored-by: Monil Patel <[email protected]> Co-authored-by: Odilitime <[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.
Relates to
N/A - this is an issue and will be described below in the Background section
Risks
Low - This is a bug fix and a defensive programming change that adds more robust input validation.
Background
What does this PR do?
What kind of change is this?
Bug fixes (non-breaking change which fixes an issue) and Improvements (misc. changes to existing features)
Why are we doing this? Any context or related work?
We're making these changes to address two issues:
/agents/:agentId/:roomId/memories
endpoint atclient-direct
wherestringToUuid()
was being incorrectly applied to the roomId parameter. This caused:To further show case the problem, orginal room ID:
ad22e47a-3fd0-05dc-8791-8fba9e475378
was altered bystringToUuid()
to8e9b5550-ca28-0f3c-a1f4-f13c2cdf3dca
, leading to memories failed to be fetched byruntime.messageManager.getMemories
.Response:
This PR implements proper input validation and error handling, making the API more robust and developer-friendly.
Documentation changes needed?
My changes do not require a change to the project documentation.
Testing
Where should a reviewer start?
Detailed testing steps
/agents/:agentId/:roomId/memories
endpoint:/agents/:agentId
/agents/:agentId/set
/agents/:agentId/channels
Discord username
jonathanykh