sspanak / tt9

A T9 keyboard for Android devices with a hardware keypad.
Apache License 2.0
253 stars 43 forks source link

Block in-app browser #649

Closed TheProgrammer26 closed 2 days ago

TheProgrammer26 commented 1 month ago

First, I would like to take a moment to express my deepest gratitude for what you have done. It is truly amazing! In a recent software update, a help menu was integrated into the settings. Within the help document, there are embedded links that direct users to a GitHub page via an in-app browser. Subsequently, users can navigate to Google by following these links. I am seeking a solution to restrict this back-door internet access.

sspanak commented 1 month ago

I can probably make them open in the default installed browser. Would that work for you?

I can also remove the links but I don't like the idea, because they contain useful extra information. Some of them, for example the one about the Xiaomi problems, do not point to GitHub but to other websites, which means I cannot restrict the access to GitHub only either.

First, I would like to take a moment to express my deepest gratitude for what you have done. It is truly amazing!

Thanks and enjoy!

TheProgrammer26 commented 1 month ago

I can probably make them open in the default installed browser. Would that work for you?

That would be great. Thank you!

sspanak commented 1 month ago

I've checked the Help screen on my testing devices and in the Android emulator all the way from Android 5 to 14. In all cases, the links open in the external browser. I don't see anything to fix.

Reading your post again makes me wonder, how did you manage to navigate to Google? In the in-app browser, there is no address bar, so it is not possible to type "google.com". Could you please double check if you are actually in the in-app browser or in some other, that you don't usually use, but is installed on your phone?

TheProgrammer26 commented 4 weeks ago

I am using a TCL Flip 2 (4058) and my browser is disabled; I have attached a few pictures as to how I can get to any website, by clicking on icons and links

Here is a picture of the help documentaion

Screenshot 2024-10-20 011622

Next, is a picture of the github page (in what I belive is an in-app browser)

Screenshot 2024-10-20 011636

From there 👆 you can navigate to the main github page (by clicking the github icon on the top of the page)

Screenshot 2024-10-20 011658

And subsequently scroll down to the buttom of the page

Screenshot 2024-10-20 011724

And as you see, from there you can accesss youtube, by clicking on it's icon (and from there you can get access to google, and etc)


And also with the other links

Screenshot 2024-10-20 011858

Screenshot 2024-10-20 011922

I believe it is an in-app brower, as there is no search bar ontop, and that the external browser is disabled on this phone.

It might by deafult open up in an external browser (which would explain what happened to you,) but only when there is no external browser, will it open up in the in-app browser format.

sspanak commented 4 weeks ago

Got it. I'll try to fix it.

Note to self: this and this contain information how to prevent opening links internally.

sspanak commented 4 weeks ago

I was not able to fix it properly in all Android versions, so I came up with an alternative solution. On Android up to 9, the links are simply copied to the clipboard, and on 10 or higher, clicking on a link triggers the "share a link" dialog from where you can share and open in any application, including a browser. If you don't want open the link, you can just cancel the sharing by pressing Back.

This should prevent the unintended access to the Internet.

TheProgrammer26 commented 4 weeks ago

Is there any possible way to restrict this loophole, as this phone is for my son, and I don't want there to be a way to access the Internet? EDIT: I misunderstood the previous comment. Thank you so much, this should do the job.

sspanak commented 4 weeks ago

In the attached video you can see that when I clicked the link a list of the installed applications appeared. I have Chrome, Google Drive, Messages and whatnot, but if the TCL Flip has no browser, he will not be able to open that link. The list would probably contain the SMS app, Bluetooth, maybe Notes and whatever else is there.

I think it is safe enough, TT9 will not open any link directly. It's a matter of securing all other applications now.

Screen_recording_20241021_221147.webm

Btw, thanks for reporting this. I completely missed the possibility of accessing the Internet this way. Now TT9 truly complies with the "no internet unless downloading dictionaries" policy.

TheProgrammer26 commented 4 weeks ago

Thank you! Very creative

sspanak commented 3 weeks ago

@TheProgrammer26, could you please check if the donation button also triggers the internal browser? I'll fix it too, if necessary.

TheProgrammer26 commented 3 weeks ago

Just checked, It closes the app (crashes on itself) and doesn't open anything

sspanak commented 3 weeks ago

OK, thanks!

yh26vh26 commented 2 weeks ago

Hi Has it already been updated or is it only going to be in the new version? Because I just tried it I have Android 8 and it did plug the links

yh26vh26 commented 2 weeks ago

Hi There is something strange here. Because until he cracks this request then I will have a problem because my phone is blocked for opening links and the like. But now I reinstalled it again on the phone and saw that it does access websites. So maybe the fix you made that there would be no internet did the opposite and caused a problem in other versions? Thank you very much

sspanak commented 2 weeks ago

The fix is not available yet. It will be included in version 40.0.

sspanak commented 2 weeks ago

@yh26vh26 , @TheProgrammer26 , v40.0 is out on GitHub and it will soon be available on all the app stores. Please update and let me know if you are still having issues with the external links, or if you experience any crashes.

github-actions[bot] commented 2 days ago

This issue was closed because it has been inactive for 14 days since being marked as stale.