-
-
Notifications
You must be signed in to change notification settings - Fork 3
build: enable http #162
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
build: enable http #162
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -28,11 +28,11 @@ public Retrofit getRetrofit() { | |||||||
| } | ||||||||
|
|
||||||||
| /** | ||||||||
| * E.g. "https://hin.test.elimu.ai" or "https://hin.elimu.ai" | ||||||||
| * E.g. "https://eng.elimu.ai" or "https://hin.elimu.ai" | ||||||||
| */ | ||||||||
| public String getBaseUrl() { | ||||||||
| Language language = SharedPreferencesHelper.getLanguage(getApplicationContext()); | ||||||||
| String url = "https://" + language.getIsoCode(); | ||||||||
| String url = "http://" + language.getIsoCode(); | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent ❓ Verification inconclusiveDowngrading from HTTPS to HTTP introduces security risks. Changing from HTTPS to HTTP removes transport layer security, exposing data to potential eavesdropping and man-in-the-middle attacks. While this is acceptable as a temporary measure (per PR description "temporarily enable the use of http:// for the backend until SSL is implemented"), it's recommended to add a TODO comment to ensure this gets reverted once SSL is implemented. - String url = "http://" + language.getIsoCode();
+ // TODO: Revert back to HTTPS once SSL is implemented in the backend (see issue #1694)
+ String url = "http://" + language.getIsoCode();Action: Add a TODO for HTTPS reversion when SSL is implemented The temporary downgrade to HTTP is acceptable per the PR description but still introduces security risks by removing transport layer protection. To mitigate this risk, please add a TODO comment indicating that this change should be reverted once SSL is implemented.
Diff snippet for clarity: - String url = "http://" + language.getIsoCode();
+ // TODO: Revert back to HTTPS once SSL is implemented in the backend (see issue #1694)
+ String url = "http://" + language.getIsoCode();📝 Committable suggestion
Suggested change
|
||||||||
| url += ".elimu.ai"; | ||||||||
| return url; | ||||||||
| } | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <network-security-config> | ||
| <base-config cleartextTrafficPermitted="true"> | ||
| <trust-anchors> | ||
| <certificates src="system" /> | ||
| </trust-anchors> | ||
| </base-config> | ||
| </network-security-config> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify the network security configuration file exists and is properly configured.
Adding a network security configuration is necessary to allow HTTP cleartext traffic, which modern Android versions block by default. However, we should ensure that:
@xml/network_security_config) exists in the project🏁 Script executed:
Length of output: 553
Action Required: Update Network Security Configuration to Restrict Cleartext Traffic
network_security_config.xmlfile was found atapp/src/main/res/xml/network_security_config.xml.<base-config>withcleartextTrafficPermitted="true", which enables cleartext traffic globally rather than for specific domains.