Conversation
Signed-off-by: Nandhukumar <nandhukumare@gmail.com>
WalkthroughThe change introduces a new configurable property Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
esignet-service/src/main/resources/application-default.properties (1)
81-83: Consider documenting URL format requirements.The validator URL is constructed by concatenating
${mosip.esignet.captcha.url}with/v1/captcha/validatecaptcha. If theMOSIP_API_INTERNAL_HOSTenvironment variable is set with a trailing slash (e.g.,http://captcha.captcha/), the resulting URL will contain double slashes:http://captcha.captcha//v1/captcha/validatecaptcha.While most HTTP clients handle double slashes gracefully, consider adding a comment to document that the base URL should not include a trailing slash, or implement URL normalization in the Java code.
📝 Suggested documentation
## captcha validation is enabled for the auth-factors - otp, pwd, bio and pin. +# Note: MOSIP_API_INTERNAL_HOST should not include a trailing slash mosip.esignet.captcha.url=${MOSIP_API_INTERNAL_HOST:http://captcha.captcha} mosip.esignet.captcha.required=send-otp,pwd,kbi,binding-otp mosip.esignet.captcha.validator-url=${mosip.esignet.captcha.url}/v1/captcha/validatecaptcha🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@esignet-service/src/main/resources/application-default.properties` around lines 81 - 83, The validator URL construction in the properties uses mosip.esignet.captcha.url + "/v1/captcha/validatecaptcha" which can produce double slashes if MOSIP_API_INTERNAL_HOST ends with a trailing slash; update the properties file to include a comment documenting that mosip.esignet.captcha.url must not end with a trailing slash (e.g., "Ensure MOSIP_API_INTERNAL_HOST has no trailing slash"), and/or modify the code that reads mosip.esignet.captcha.url (where the validator URL is assembled) to normalize the base URL by trimming any trailing '/' before appending "/v1/captcha/validatecaptcha" (adjust the normalization in the Java method that builds the validator URL).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@esignet-service/src/main/resources/application-default.properties`:
- Around line 81-83: The validator URL construction in the properties uses
mosip.esignet.captcha.url + "/v1/captcha/validatecaptcha" which can produce
double slashes if MOSIP_API_INTERNAL_HOST ends with a trailing slash; update the
properties file to include a comment documenting that mosip.esignet.captcha.url
must not end with a trailing slash (e.g., "Ensure MOSIP_API_INTERNAL_HOST has no
trailing slash"), and/or modify the code that reads mosip.esignet.captcha.url
(where the validator URL is assembled) to normalize the base URL by trimming any
trailing '/' before appending "/v1/captcha/validatecaptcha" (adjust the
normalization in the Java method that builds the validator URL).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: af35390b-aa47-4f89-9907-e55b1cda0ff6
📒 Files selected for processing (1)
esignet-service/src/main/resources/application-default.properties
Summary by CodeRabbit
Release Notes