Hacker News new | past | comments | ask | show | jobs | submit login
See what JavaScript commands get injected through an in-app browser (krausefx.com)
763 points by krausefx on Aug 18, 2022 | hide | past | favorite | 307 comments

In-app browsers are a huge mess and security/privacy nightmare. Browsers implement a security sandbox. In-app browsers break and circumvent this threat model in nasty ways. I hope this gets the same attention as cross-site scripting (XSS) attacks and browser engines implement strict countermeasures by default locking WebViews to the equivalent of an Incognito/InPrivate tab.

I always hate in app browsers and always reopen them in Safari, for UX reasons. Now I hate them even more, with even stronger reasons.

Yeah - I never want an in-app browser. I wish it could be broadly disabled at least as an option, though I'd be fine with apple just removing the capability entirely.

It's particularly annoying with account cookies and such when I'm already authenticated in the normal browser.

Unfortunately I think they’re very popular with unsophisticated users. I’ve heard stories about companies getting a ton of support emails because someone clicked on an article link shown in $someApp, the user was booted to Safari, and didn’t know how to get back to where they were before.

I’ve heard of developers adding the in-app thing despite hating it personally just to reduce the support burden.

I’m more of GP’s mindset, but I’ve often wondered how many people would become lost the way you describe if my preference was the default. I have the benefit of knowing distinctly when I’m navigating from app to web, but I can relate to being disoriented navigating between different types of views within a given app.

There’s the tiny “back button” in iOS that takes you back to an app which triggered an app context switch, but it’s barely noticeable and barely reachable on most current iPhones. I swipe between apps even when I do notice that. But I’m not sure how widely it’s even known you can swipe between apps.

(For anyone reading who doesn’t know, if you have an iPhone without a home button, you can swipe left/right on the space right at the bottom of your screen, where you normally would swipe up, and it’s like the cmd/alt+tab default. You can also do this on the URL bar in Safari to switch tabs, if you stick with the default bottom URL bar.)

I’m with both of you, but it is a real problem.

I know someone who has no problem getting back to the app they were in, but doesn’t seem to know about/use tabs on their phone. Since tabs don’t auto-close by default they often have hundreds of them by accident that opened one by one when they followed a link in another app like Messages or Mail.

I’m pretty sure they know about tabs on the desktop, though I’m not sure they use them. On the phone it seems to be just a little too “out of sight out of mind”.

The solution here is for the company to make a proper help page explaining that, then respond to all the support emails with a link to the help page.

No need to poison the well for everybody else due to wanting to avoid a "support burden."

My own product/company has a few common issues like this, and the help page strategy works fine. Answering emails for these types of things is not a big deal as long as you have stock answers/pages prepared.

No layperson such as a TikTok user is ever going to read a help article. Much less an error message popup.

If you navigate out of an app iOS adds a ‘back’ link on the top left of the screen automatically. This is not going to cause ‘a ton of support emails’; your stories probably are from versions of iOS when they didn’t do that, which is so long ago I couldn’t even find how long.

iOS makes this very easy where every app launching another provides a link in the top left. I find it hard to believe users of tiktok and snapchat with their weird hidden/discoverable functionality of swiping from different places would have issue with the button that says "< snapchat" at the top.

But ok, let's say I am giving too much credit to people. Just put a setting in to use the default browser for those of us that want it?

What really annoys me is that Facebook messenger used to offer an option for how to handle external links, but removed it in favor of one of these in-app browsers.

It’s quite clearly a user hostile decision, but they presumably did it for all that activity tracking they can do.

It seems like there should be a setting to make this the default. Sometimes I'll navigate a bit within the in-app browser after clicking on a link from like Twitter or something, and I'd much rather it pop open Firefox or something that I can actually trust. Now it sounds like Apple and Google should start putting warnings on these things by default, yeesh.

I'd like to add that I haven't been able to find a way to escape the TikTok in-app browser on Android. There are no buttons, not even a URL bar to copy from.

They're going to heavily lockdown WKWebView after the Instagram and Tiktok revelations, probably in iOS16.1. They may even remove it entirely and force people to use SFSafariViewController (heavily locked down web browser, opaque to developers other than URL). Best of luck to anyone that was using javascript injection for legitimate purposes, others have ruined it for everyone by abusing user trust.

I highly doubt this will happen. There are a ton of apps that use things like Cordova or Capacitor (usually for cross-platform purposes).

What I could see them doing is making apps declare URLs that they need access to. Basically, you get full functionality on declared URLs, but if you are just using WebView for a "generic" in-app browser you lose the ability to inspect random pages.

> What I could see them doing is making apps declare URLs that they need access to. Basically, you get full functionality on declared URLs, but if you are just using WebView for a "generic" in-app browser you lose the ability to inspect random pages.

This is exactly what I'm expecting, because that's how they've handled other similar restrictions. Becoming a full on web browser with the iOS 14 web browser entitlement will probably be the only way to not be bound to a list of URLs, and they don't hand that entitlement out willy nilly.

The mechanism you are describing is already implemented and advertised: https://webkit.org/blog/10882/app-bound-domains/

Apple „just“ need to enforce it.

Couldn't you just proxy everything through a host you own?

Wouldn't a simple solution be to require apps that aren't browser to list a limited set of domains they're allowed to access? Then you could use the WkWebKit view for your app but you couldn't use it to allow the user to browse the web.

Browsers would get a pass where Apple would come up with some rule but clearly the Instagram app, the Facebook app, the TikTok app, the Gmail app, the Google app, are not browser where as Firefox, Chrome, Brave are.

iOS already has a method to associate websites with apps but I see some problems with this approach.

1) If you go with the "associated domains only" approach that requires proof of domain ownership(usually through adding TXT into the ZONE files), you lose the category of apps that function by transferring a session of a website into the app to function. This is a popular approach for reader apps that don't have an official official affiliation with the website they interact with or the website doesn't have an API to do direct app connection.

2) If you go with the route of pre-defined domains that might not be associated officially, you fix the problem in the first point but you also create a vector of attack to scoop data from targeted websites. For example you can collect data from reddit, facebook and instagram. 3 websites only but more than enough to cause headaches.

IMHO the proper action would be to put the script injection and data access capability behind a user consent prompt.


For legitimate reasons, the app can inform the user about why they need to do this and the user can accept that and even better, they can implement legitimate APIs.

Yes, please give us more cookie consent banners!

See, you don't have to ask for consent if you don't want to do shady stuff. Websites don't have to have cookie banners if they don't want to track you across the web and apps don't have to have access web data prompt if they don't want access the browser data in the app.

PS: very convincing GPT-3 bot comment, exactly what a redditor on autopilot would write(according to the profile, the OP is a bot).

A lot of people getting upset that you're highlighting that the account is a bot. Before anyone else tells mrktsn off, please read the user's profile.


I also think that the bot did a good job here.

Accusing authors of dissenting opinions of being bots is the definition of bad faith and fosters an unhealthy discussion culture.

bad bot

I think it‘s hilarious he stood up for himself but I feel bad about his lack of self awareness.

To be fair, could equally be read as “just because I’m a bot doesn’t mean you should ignore everything I say” :)

I understand “us” as users in this discussion, not as site owners. Your idea is cool, but we have no control over who wants what, so we’ll have yet another consent annoyance as a result.

The cookie law is not implemented as a browser function but something that operators need to implement if they want to legally track users. It's an annoyance because each implementation is different and every website wants to track users. If EU went after Web browsers and made them implement the legislation as an API, we would have had tracking prompts like location or camera access prompts and probably kill the tracking industry in a similar way Apple killed App tracking with their tracking prompt.

In the case of UIWebView/WKWebView (AKA the browser within an app that can access web data), this can be implemented by Apple as any other data access prompt like location data access or App tracking access for example.

Apps like to track user data like user location too but thanks to Apple's implementation of prompting the user first, they need to have a legitimate reason to request that information.

So, I guess, apps can claim that they need to access web data to provide some service(like widget, sign in session to transfer the login into the app etc) and users who want that can accept the requests and those who don't can have peace of mind.

I agree and should have thought about it this way, my bad. If there will be a way to deny that system-wide or at most once per app, no issue then.

Edit: the confusing part was “the contents of this website”, which made me think of per-site basis.

Sure. The "bot" ridiculed your idea for good reason.

Check the profile, I'm not claiming that OP is a bot - the OP describes the profile as a bot.

That's a really low quality discussion, so I will leave it here. Can we please not turn HN into reddit? If you have an argument write an argument instead of trying to insult people(or don't write anything, we don't have deficiency of this type of attitude).

Shady stuff like highlighting terms the user searched for. Don’t forget there are of course legitimate use cases.

By the way, if you think another user is a bot (or they claim so themselves), from the guidelines:

> Please don't post insinuations about astroturfing, shilling, bots, brigading, foreign agents and the like. It degrades discussion and is usually mistaken. If you're worried about abuse, email hn@ycombinator.com and we'll look at the data.

I don't think that another user is a bot, another user has stated in their profile description that they are a bot account randomly posting GPT-3 generated comments. I made no claims but comment on the quality of the bot.

What a bummer people are quicker to grab quotes from the ToS to try to tell you off for calling someone a bot, rather than 1 click on the accounts name to find out for their self. Even HN isn't immune from the lazy reactionary commenting these days it seems.

> … (or they claim so themselves) …

I’m not sure they can.

While SFSafari is a much better choice for what the apps are doing here, WKWeb has legitimate uses.

I suppose Apple could lock it behind an entitlement, but that would take a while as WKWeb is already very prevalent and people won’t replace it on short notice like a point release. Even iOS 17 seems fast.

Plus there is the general power issue. Apple could have done many things over the years to FB (and IG) but they’ve been treating them with kid gloves because those apps are so important. You can definitely add TikTok to that list.

In an app I'm using postMessage and JS injection to communicate between our in-house HTML/CSS content (due to what we're building, we had and still have many legitimate reasons to code that way) to seamlessly integrate the native side and the dynamic HTML views.

Any change would be a huge nightmare for apps like ours, potentially impacting many other apps as well.

Apple started moving in this direction in 2020 with the introduction of App-Bound Domains[0]. These are currently opt in but I have always expected that, just like with the HTTPs adoption, they'll start enforcing this more strictly. With App Bound domains an app specifies ahead of time which domains are app bound and should allow injecting Javascript etc.

I expect app-bound domains to become required for all apps in iOS 16 or possibly iOS 17. There will probably a be a limit and some review on which domains an app specify as app-bound. Web browser that use WKWebView already have a special entitlement that excludes them from this.

0: https://webkit.org/blog/10882/app-bound-domains/

Locking down in-app browsers seems like a reasonable trade-off. Kind of surprised it wasn't the case before, since browser extensions have had site permissions for ages now.

One could just follow what browsers do for extensions: have the developer specify a list of all the hostnames that they want to enable script injection on in a manifest, and ask for permissions at the start. Anything not on the list must be loaded via a sandboxed browser.

Keeps legitimate uses functional while preventing broad script injection.

> They're going to heavily lockdown WKWebView after the Instagram and Tiktok revelations, probably in iOS16.1

are you just making a prediction, or do you have knowledge of this?

Just a guess if I were responsible for making the decision. All these methods will probably disappear or get much tighter on how they can be used: https://developer.apple.com/documentation/webkit/wkuserconte... https://developer.apple.com/documentation/webkit/wkwebview/1...

+1 thanks for the info - it makes sense that Apple would try to mitigate this on their platform.

I use Apple’s new Lockdown Mode on the beta iOS 16 and iPadOS 16. I generally like it. It largely disables arbitrary JavaScript, as far as I know. A few times a week, I will turn off Lockdown temporarily for a few minutes for a web site if there are any problems. This is usually Amazon.com’s Kindle preview feature.

Lockdown mode is a security measure and not a privacy one.

It disables JavaScript JIT compilation, which makes it slower but more secure.

It should not disable any JavaScript execution itself.

Do we know if lockdown’s JS protection applies to apps using WKWebView? That could flat out break a lot of apps.

I thought lockdown mostly applied to system stuff (including Safari).

I hope they leave means of communication available. Something like window.postMessage. Like how Chrome extensions can expose a limited part of the Chrome API to webpages so they can post messages to certain extensions, without needing to inject anything into those webpages.

I hope it gets locked down further just like how Apple introduced App Tracking Transparency, to further reduce and make it harder for data collection like this so that it is not open to abuse, not just this but in all of iOS in general.

Whether if it is collecting biometric data, voice prints, reading the clipboard, collecting information around local network devices and now abusing the in-app browser to further collect user data, the same social networks will try anything to abuse the iOS system to collect as much data as they can.

Given that Facebook did the exact same invasive actions and was fined in the billions, there is enough evidence of these invasive data collection practices that TikTok has done over the years to be worthy of a multi-billion dollar fine.

There is no exceptions, excuses or any room for double standards.

I can’t quite figure this out: it sounds like if you click a link in someone’s TikTok content, the in app browser can read any text entered on that site using the in app browser. Does just not entering any keyboard input in the in app browser mitigate this?

Does Apple Lockdown help in this situation? I thought that typical TikTok use just involved scrolling and watching video content. Are users who only view content subject to this security flaw?

Thanks in advance for any clarification.

Also, off topic but doesn’t YouTube’s “Shorts” take the place of TikTok? I have my Google privacy settings set so YouTube can store my viewing history for one month so I get reasonable recommendations. Does TikTok have similar settings?

They do a lot more than that.

> TikTok iOS subscribes to every tap on any button, link, image or other component on websites rendered inside the TikTok app.

> TikTok iOS uses a JavaScript function to get details about the element the user clicked on, like an image (document.elementFromPoint)

And that's just a sample of the calls the author was able to find.

This seems perfectly reasonable btw. The extension to the in-app browser existing and logging non-tiktok browsing is troublesome.

Perhaps Apple should ban in-app browsers? But what about Safari? Apple itself collects and benefits from Safari data for its ad product

If I build an analytics company and build a product that my customers can use to "analyze" their users activity it'd almost be a total neglect on my end not to include common tracking mechanisms that are well documented like simple event hooks in js. I really don't get the rage against tiktok.

What they do that is publicly known is not bad. Maybe there is something bad they're doing but these random HN top stories are not it. If NSA/US govt really wants us to avoid tiktok it needs better convincing than "omg they're stealing the x,y of your finger when you tap on an image."

You're writing as if this is just analytics tracking a user's actions in their own UI. It's not! This is tracking actions users take, and data users enter, on 3rd-party websites.

That is not "what happens in Tiktok's app," as you put it in your reply. It may be hosted "in" the app in a technical sense, but the typical user who is fullscreen viewing a totally different website may not feel like they are "in" the app at all. I wouldn't bet that most users even get that there's a distinction between an in-app browser vs. opening a tab in the main OS browser (on Android at least, the back gesture takes you back to the app either way). Users almost certainly doesn't expect the original app to be able to read passwords and other text that they type on those 3rd-party sites.

And how do we know Instagram and yelp are not doing something similar? If you have in app browser you can track user activity much more invasively. That’s not an argument against tiktok, that’s an argument against in app browsers. If you’re so concerned with user privacy ask Apple to remove that functionality from all apps instead of slyfully picking and choosing the apps to attack.

Instagram does do the same thing afaik

If you sold a phone that sent call details back to the manufacturer you’d likely get locked up.

Tik tok are not a party to these communications, and they’re not a carrier or service provider. What they’re doing is wire tapping.

TikTok is not a browser and has zero obligation to provide private communications. What you do inside TikTok's app is quite literally TikTok's business.

But when you click a link in the TikTok app, TikTok opens an in-app browser for you to view it in - and that’s where it’s gathering all the information. It’s a deceptive practice, since most users won’t realize that they’re not simply surfing a website as usual.

Not only that, but per the article, TikTok is the only popular app that does this while not providing an option to open the link in regular browser from within the built-in one.

This is just an idiotic statement. Almost all social media apps do this. In addition apps like Yelp do this to the determent of business owners.

Did you just wake up today after reading this article and learned about the existence of in-app browsers? This is a common practice by almost all social media apps.

You are aware of the various privacy laws in a lot of countries?

Unfortunately, the issue of consent is extremely muddy as it's easy to argue that the average person is not informed enough about the issue at hand, and so they have improperly developed expectations when engaging with the TikTok browser.

Lack of consent and lack of transparency, make this whole thing pretty messed up.

surely slurping up passwords at least seems ominous?

What happens in tiktok app is very much tiktok's business and their IP.

Are you possibly conflating tiktok tracking its own users within its app with somehow it gaining access to the OS itself and tracking users at that level? That is clearly not happening as far as what is publicly known as much as stories like this want you to believe for it to be the case.

It makes sense when you’re a slick lawyer appealing to technicalities, but in reality users don’t know how their devices work and where borders of an app are. If tiktok was a restaurant, we would talk about its restroom surveillance here. It may not collect too private information like passwords or messages, but the doubt is reasonable.

Would consider it right for a browser to snoop on every page opened, every link clicked, every character typed and send it to the cloud without informing the user?

No my point is why single out tiktok when every other social app is doing the same exact thing for all we know in their in-app browsers. Just because the researcher in this particular article happened to go after tiktok?

Why not use an example if you know they are doing it, if you don’t have time to lookup what all the others are doing? Its a pretty weak defense that everyone else is doing the same wrong thing.

It's not a defense, I'm simply asking why is everyone pilling on tiktok over some javascript trickery just bc they're deemed an enemy of the state by our all mighty government?

Apple exposes two ways to use an in app browser. One is a legacy method that gives you full control, the other gives the user a sandboxed browser with no interference from the app.

TikTok isn't the only app abusing this. Instagram and Facebook will both do sneaky things like respond to the content of the page you're browsing (asking to save passwords in their own private keychain, showing context specific information, etc.)


You're not exposed to any of these if you don't open a link inside the in-app browser.

The most common reason to click a link in their in-app browser is an ad... so obviously TikTok, Instagram and Facebook are using the in-app browser to track your interactions after the ad click and sell the data

There is a difference between tracking activities (bad enough) and reading everything you type.

People really want to force outrage on this, but after enough interaction with the ad (scrolling, clicking, typing) TikTok asks about your experience with the ad.

TikTok is not pretending to have opened your system browser, it goes very far in doing the opposite:

- Hides the normal browser UI

- Replaces every page load with a TikTok spinner

- Permanently places a TikTok header bar over the screen with a report content button tied to TikTok

Combine that with the fact so many people seem to not realize... the only links you can open with the browser are links sold with analytics (ie you can't post arbitrary links as a user commenting) and the outrage just doesn't add up.

A completely non-technical user going through that flow would expect that they're still in TikTok and are using TikTok not their browser

Apple needs to give us power-users the option to decide whether to load such web contents (in apps) in either SFSafariViewController (sandboxed) or WKWebView (fully exposed). This is especially critical when, for example, payment processors load your net banking portal inside apps (a common mode of online payment in India) - unless it is sandboxed, the app and / or payment processor has complete access to your netbanking credentials.

>> Does just not entering any keyboard input in the in app browser mitigate this?

yes but i doubt the hundreds of millions of users, many of which are children, know this

To play devil's advocate... the most common way to end up in the in-app browser is to click an ad.

Non-technical people don't have a concept of "in app browser sandboxing". In their minds they clicked on an ad, they're still inside TikTok, TikTok's UI is showing, TikTok will show prompts based on the content shown... they probably assume TikTok has access to that page?

Honestly I'm more annoyed that Apple allows big apps to use the loophole that is the legacy webview than I am that TikTok uses that webview to do the exact single thing it's good for... having full control over the web content you're showing in app.

How do you know that's the most common way?

Because I doubt it is. People click links in chats and in their feeds way more than they click ads

That is completely wrong since most users cannot post a website link (hotlink if I need to spell that out...), let alone in a comment.

The only way for a non-ad link to be opened from comments is to copy it and paste it in your native browser.

Business accounts get a special link field that's part of their bio, so again, deeply embedded in TikTok... and those behave exactly like the ads do. TikTok has a permanent "Flag" UI on top of the site, they replace every page load with a TikTok spinner

As expected half the people outraged don't even know what they're outraged about.

It's ironic how you were being condescending when you used the term hotlink ("if I need to spell it out...") and yet used the term incorrectly

Ironic that you latch onto a completely inconsequential mistake to divert from the fact you had no idea what you were talking about.

I just didn't feel like further arguing.

In that guy's other comment he was talking about Meta/Facebook too which is what I'm most familiar with and was primarily referring to about people clicking on links.

Even with TikTok I bet people click on profile links more than ads

Also that's not ironic, maybe you are thinking of another word

The entire thread from the parent is about TikTok.

And "you bet" wrong, since the profile links are only enabled for business accounts.

But you're right about one thing: it was not at all ironic you'd deflect. It's exactly what I'd expect after someone misses what a thread about and makes assumptions about a subject they don't know.

That was some people call sarcasm.

I know they are only enabled for accounts that get some particular amount of views. But there are a lot of those accounts

You were the one who brought up Facebook first in your other comment...

The shitty code injected generates a ton of errors. After initially being super annoyed about the noise in our exception reporting, a bright spark observed that it may also be used for detection and user protection, albeit only for our own users.

This is wonderful work you are doing. It has been a joy to follow.

Can websites protect against this through the use of Content Security Policy (CSP) [0]?

[0] https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP

It might make it much harder to inject stuff, but since the apps control all aspects of the embedded browser and CSPs are enforced by the browser, they could feasibly just disable CSP enforcement and have the embedded browser ignore the CSP.

I don’t think Apple gives access to the CSP or a choice in obeying it. I’ve been working with WKWebView recently and don’t remember running across it.

Now you could go really far to get around it. Request resources yourself and hand them to WKWebView directly so no CSP is served but that’s not going to be easy. You’d have to scan for any other resources that might get loaded, pull those, inject them correctly, etc.

Seems like it would be very fragile.

I'm not remotely an iOS dev, but the workaround you present seems reasonable to me?

Just make your own http(s) requests, fetch the page contents, ignore header CSP, strip CSP in the HTML and send the string to the web view thing. A cursory glance at the documentation seems to show that the web view thing allows for rendering HTML strings. Not sure if that also loads external resources in the HTML supplied, but if so it would be relatively minimal work.

(Companies have spent much more dev effort to get similar tracking capabilities. E.g. WeChat on Android implements an entirely custom rendering engine from scratch rather than use any system web view component.)

Not at the moment. This article from last week when the issue got exposed is arguing for adding it https://news.ycombinator.com/item?id=32418679 * Let websites framebust out of native apps *

CSP protects against an XSS threat model, but once the attacker has control of the browser itself, defeating CSP is trivial since you can just decorate scripts with the nonce string (or equivalent).

On iOS you still don’t control the browser in an app, Apple limits what you’re allowed to do. I’m not sure you can disable CSP. See my reply to your sibling comment.

I'm just curious, there are plenty of 3rd party full-featured browsers based on WKWebView that are injecting tons of JavaScript into all pages and basically doing the same as in-app browsers. So what's the difference?

The article actually mentions those:

> [...] they use JavaScript to offer some of their functionality, like a password manager.

Basically a 3rd-party browser needs to use JS to offer any features or real benefit over simply using Safari. But as a TikTok user you have no benefit when all links open inside the app with tons of custom JS injected that seems to be mainly for tracking you.

Apple and Google have guidelines about what apps are/aren't allowed to if they want to be on their app store.

"Protecting the user" is supposed to be one reasons they take a 30% cut of all in app purchases. Apple even uses this as an excuse to not allow side loading apps.

How are they not blocking this?

Thought Apple was the bastion of consumer privacy. Apparently removing TikTok though is not commercially beneficial for them

not to mention the elephant in the room: Apple Finds Its Next Big Business: Showing Ads on Your iPhone https://www.bloomberg.com/news/newsletters/2022-08-14/apple-...

Apple hashes and sends over wire every bin you run, if that's a 'bastion' then RMS was right.

Ads and tracking aren’t inherently linked, it is possible to have one without the other. That’s allegedly what Apple is doing, so it doesn’t clash with the privacy commitment.

Even so, I disapprove of Apple’s forays into ads and wish them swift and hard failures in the area.

Google isn't blocking this because it would be a silver bullet to FTC for aiding Youtube. Apple isn't blocking this because they are beholden to China.

Is there anything website owners can do about this? I've been many web games, including my own, embedded and surrounded by adverts (see dordle,io, wordle-unlimited,io). Simple permissions like x-frame-options won't work since they're proxying everything onto the same origin. I've thought about checking after a few minutes if the user is on an embeded DOM then asking them to head over to the real site.

No, the browser is the "user agent" and decides what to do. The problem is that in this case TikTok is the browser and does what they want, not what is good for the user.

It is actually quite a hard problem. The App Store does ban third-party browser engines so maybe they can add a restriction that apps can only inject code into verified domains. Surely a few legitimate use cases would be lost (IDK apps that let you annotate websites or something) but it may largely mitigate this issue. Maybe there can be a permission or a review entitlement that allows this for valid use cases (as decided by Apple of course).

Among other things my content blocker for iOS will display a page in a WKWebView they injected scripts into.

It makes it so I can easily select and refine which HTML element I want to add to a custom blocking list.

I think that would be impossible without this.

How long until these apps block the URL 'inappbrowser.com' as malicious so you can't use it to see what the app is doing? :P

Or better, not inject anything when detecting inappbrowser.com

I feel like there is a litany of the internet: "that which can be collected will be." That's been true since the beginning. What continues to surprise me is that people think only "bad guys" do it.

This is why we continue to lock down browsers and provide ever narrower permission classes.

What surprises me is that this is technically possible on iOS.

It’s an abuse of a feature, in a way. There are certainly non-evil use cases for the feature being used here.

But as we know, that which can be used by advertising/tracking people will be used by them.

People only care when "bad guys" do it

That's because only "bad guys" do this. If a "good buy" does this, they automatically become a "bad guy".

I think madrox is referring to 'good guys' as in Western countries vs China etc, not literal good guys and bad guys. That's a fairly common view, regardless of all the actual bad Western country leaderships' conduct.

I think I agree with you here. It's proof by definition.

I hate that if I send Wordle or something cool to a friend that uses localStorage they lose their progress/settings once they leave the chat app.

So frustrating to even explain to people that this thing they are scrolling isn't their own, Safari/Chrome!

It's just another piece in how Apple sabotaged the web.

Since "the web" has become about 7-10 walled gardens for 90% of the public, whether Apple "sabotages" "the web" in allowing these "garden" apps to use their own browsers is hardly any more broken than anything else.

"TikTok subscribes to all keyboard inputs (including passwords, credit card information, etc.) and every tap on the screen, like which buttons and links you click."

How does Apple even remotely allow this?

They ban apps for the most arbitrary of reasons, I know small devs that get bumped for tiny things.

This is beyond ridiculous.

A company that has ~100M american users, and CCP on the board with a CEO/Board completely and publicly compliant with the 'wishes of the CCP' including reporting any and all sorts of things, is literally able to collect any data including passwords.


How is this not a giant story?

How does the US Government not issue an immediate statement/warning to the general public and talk to Apple/Google about this issue?

My gosh.

A keylogger in the browser is a pretty sick violation of privacy.

I think the big question is, what are the event handlers doing exactly? I'm definitely not defending any of these companies but it just seems fundamentally unclear what gets done with the data. The presumption is that the event data is passed to some private storage against users' consent. But for all we know it's also possible there are automated filters in place to detect sensitive information and drop/obfuscate it. Still, I wouldn't count on that.

I will say that it doesn't look great to have a `keypress` listener on the window/document...certainly that's not used for anything good.

For some reason, the phrase "JavaScript commands" stood out to me as being rather awkward. I'd just say "injects JavaScript code" or "injects JS".

We can’t know what TikTok uses the subscription for

According to the code on that page, the function named 'i' needs to be investigated further. It appears to return another function which is then called to process the keypress event.

I'm sure this isn't just iOS. I opened the link on Facebook for Android's browser and got a bunch of script injections...

Off topic, apologies: I read that TikTok contracted with Oracle Cloud to handle computation and data inside the US and do some privacy related data flow checks (not back to China). I wonder how big of a business this is, revenue wise, for Oracle Cloud? I also wonder if anti-TikTok public opinion will rub off on Oracle Cloud?

You can ID users based on the cadence and relative timing between keypresses to identify anyone regardless of their login credentials.

You can also detect bots, even skillfully crafted ones.

Why don't we expand wiretapping laws to this stuff?

The more I read about the massively privacy invading features of TikTok, the gladder I am India banned it.

My question is just, “why do we let everyone ale do this? Why do we only react when it’s a Chinese company doing it?”

There is a call for comment by the fcc right now about how people feel about data collection and surveillance. Please go and send in a comment to regulate these behaviours

To be fair, Facebook and Instagram were caught first, and the news got to the front page last week.

When I used TikTok on Android, it was the most infuriating in-app browser experience because it had no way to open the URL in your real browser. Not even a way to copy the URL to your clipboard. I guess now I understand why

Is it similar to what Meta in Instagram does? [0] - a week ago thread.

[0]: https://news.ycombinator.com/item?id=32415470

Yes and that’s literally the first link in the first sentence in the first paragraph of the article lol

TikTok is no different and is beyond worse than Meta at this point. Whatever Meta is doing doesn't excuse the reasons for this tracking.

Given that Facebook was fined in the billions for this abuse in the past, TikTok should also be fined for this with in the billions of dollars.

We have learned nothing around this and have repeated the same problems in social networks a decade later.

Fines, even that high, do not stop this, as we all see in no change in Meta actions.

Also, cannot avoid thinking that Facebook was accused of (somewhat similar) web site spying long time before Tiktok existed.

You're linking to the same site as the OP. This is the follow up blog.

All my hobby websites I own have all these in-app browsers blocked.

Hm, how does that help the user?

How do the in-app browsers help the user?

They show the user the website they tapped on…

That's not the question. How does it help over just opening normally in the browser?

I wouldn't be surprised if Apple bans in-app browsers before long and forces all apps to use Safari, which would be a good thing.

This is good. It's the price for using the site. They're not alone!

Can this be circumvented by a very strict Content-Security-Policy?

It’s on the browser to enforce CSP headers. In this case the browser itself is doing the malicious script injection. Think of it as a browser extension, just running without your consent. It’s up to the browser - not the website - to reject it.

TikTok should be banned. India has the right idea. We should align more with them.

Banning it isn't for geopolitical reasons although I think those are valid given the CCP's publicly stated agenda (Global communist revolution essentially. Millions of lives sacrificed for Marx). It's just that one less mind hacking app for children is a good thing. What about FB, Insta who are just as bad etc? Simply doesn't matter. If people left FB for TikTok, and TikTok disappears, some significant % won't come back and that's a win.

Marx wouldn’t approve of some sort of great leap 2.0. CCP sucks, but since World Wars, have you seen the list of countries the US alone has invaded or led coups in? Add in the rest of the west.

It doesn’t matter much what some state’s publicly stated stuff is. There’s no reason to believe any country blindly. Their actions speak louder.

Don't all in-app browsers do this? I think I read that instagram does the same.

No not all of them do this. Yes, Instagram does, as per the chart in the article. The difference is Tiktok forces you to use their in app web view, and does not allow you to use your default browser, where they would not be able to inject their own JS code. Even worse, Tiktok monitors every single key stroke, a key logger in effect, where Instagram does not (according to the authors research).

If you open the article, it compares it to a few apps. TikTok blocks you from opening it in your default browser. The others don't

No, AFAIK not on android. As it uses the default browser, just in webview mode.

iOS and Android both have equivalent "bad" webviews that can be tampered with and "good" webviews that can't. Instagram on Android uses the "bad" one.

Instagram is a spyware company owned by a spyware company

Don’t use tiktok

Trump was right about that

Instagram and Facebook do the same thing.

N wrongs don’t make a right.

not nearly to the same degree

Facebook knows your education, where you went, what class you were in, what friends you had at that point, how you look, how you looked 10 years ago, what family members you have, what relationships you have and had, where you work, what establishments you've recently visited, what articles you engaged with more than others on your feed. And a lot of it isn't even voluntary because other people can fill it in for you.

TikTok knows my age, my location and viewing habits, TikTok knows that I stared at clip x more than clip y. TikTok might have figured out my age, gender and my sexuality based on what I watch and can probably figure out more just from what I view but saying it's somehow more than Facebook is inane.

one is literally made to have as much information about you as possible, that's like the core concept of Facebook.

I was referring to the JS injections talked about it the article, not what data FB has about you overall, which of course is much more if you have a FB account.

And I wasn't saying FB is better overall; I deleted my FB account 7-8 years ago. I don't go on Tiktok either because I don't trust it (also not that interested). I do use IG (yes, I know owned by FB but I don't have it linked to any FB/other account) and Twitter (and Reddit, IRC of course).

How do you know?

read the article

I did, did you?

"Important Note: This tool can’t detect all JavaScript commands executed, as well as doesn’t show any tracking the app might do using native code (like custom gesture recognisers). More details on this below."

I just don't understand how we can allow a Chinese social media app in the west, while any non-chinese social media apps aren't allowed there?

Same with housing, why can Chinese nationals buy housing here, while I can't do so there?

People are going to reply to you with the usual "we are better than them", "we are a democracy" etc., but reciprocity clauses are very common in areas like international trade, travel, disarmament treaties, emissions control and lots more. In fact China would never have been allowed into the WTO (which happened in 2001) had they not made sweeping changes to their economy and assured the world that they would compete on a fair playing field, rules that they still (mostly) have to follow today. Requiring that American software companies have the same opportunities in China as Chinese ones enjoy in the USA is a perfectly sane position to take. In fact it is the fair and democratic one.

Of course politicians don't really understand tech enough to realize how quickly (and how unfairly) China is growing to dominate the space.

> Same with housing, why can Chinese nationals buy housing here, while I can't do so there?

Housing is a completely different conversation, and the answer there is that existing homeowners would never allow the influx of foreign cash into their local markets to stop, and they are the ones with all the influence in this country, not the renters or aspiring buyers.

"had they not made sweeping changes to their economy and assured the world that they would compete on a fair playing field, rules that they still (mostly) have to follow today. "

This is really quite false.

Rules are broken all the time, they are difficult to arbitrate, and often they are not.

The CCP requires foreign entities to surrender critical IP, then hand it off to a state-backed competitors, they don't allow full ownership of local companies, there's direct political interference including the requirement for all companies to directly hire CCP members as oversight, and if it's important enough, to have the CCP right on the board.

All of this in addition to the death by a thousand cuts the system can make for foreign competitors via local bureaucratic requirements at every level.

This applies not only to commerce but critical institutions such as WHO which are directly compromised by China (i.e. not allowing any material investigation into 'lab leak origins' etc. etc..)

The OP presented the situation very clearly: there is no way in any scenario that China would allow an American company to have a TikTok like app used by large swaths of the Chinese population, controlled by the US.

Neither would Russia.

On some level, that kind of thing is a bit understandable, I don't quite mind if China would not allow 'Facebook' to be the #1 communications tool in China, that said, it should be reciprocal.

And for other things, like high-speed rail etc. China has been grabbing IP using leverage that never should have been allowed.

>Neither would Russia.

Facebook, Whatsapp and Instagram worked pretty well here, to the point where almost every teenager has an Instagram account, so I think this is proven to be false. The only reason Instagram is banned now is because of the ability to use it to spread pro-Western propaganda instead of pro-Russian one.

Yes, they banned some and restricted others, that's my point.

>they don't allow full ownership of local companies

That isn't completely true anymore.

"Foreign investors are now allowed to establish wholly foreign-owned enterprises for whole vehicle manufacturing, including special purpose vehicles, new energy vehicles, commercial vehicles and passenger vehicles."


The wisdom of reciprocity also is older than all governments today.

See Golden rule and Silver rule.

There were governments when those rules were formulated. Unless you mean, "Older than all governments in existence today," which might be true.

Reciprocity predates humanity by many millions of years: https://en.wikipedia.org/wiki/Reciprocal_altruism

Of course there was reciprocity between people prior to the first government. It almost certainly wasn't called the golden or silver rule, but of course it existed.

Look, I'm no fan of the Chinese social construct, but in terms of investment and development in an area I've tried to work in for the past 20 years, namely high-tech renewable energy development, the USA has dropped the ball while China has run with it. The US response has been tariffs on Chinese monocrystalline silicon PV panels, in a rather pathetic attempt to prevent them from gaining market share, while promoting nonsense like CdTe panels and so on. GW Bush and Barak Obama blocked DOE money going to renewable R&D just like Reagan, Bush and Clinton did, because the USA is mostly a petro-state economy (just look at CVX and XOM profits recently FFS)..

So China ran away with renewable tech developement because greedy Wall Street executives didn't want competition to their lucrative fossil fuel investments. Fucking retards.

I thought Obama was blamed for giving too many loans to renewables? https://www.energy.gov/articles/president-obama-announces-mo...

This is why we have fallen a decade behind on semiconductor dominance. the next wars will be won not by who owns the oil, but who owns the semis to drive the robots..

Why is it unfair?

Because non-Chinese companies cannot compete in the Chinese market place without strict handicaps. Some cannot participate at all.

However the true question here is more likely to be "what does unfair mean".

There are tradeoffs to protectionism that are inherent disadvantages in the strategy itself that doesn’t need someone to make it a disadvantage. Otherwise all countries would be protectionist all the time.

Tik tok dominating is just good old outcompeting the competition.

Protectionist strategies create less domestic competition, resulting in underdeveloped industries that would die off in the face of real competition. So if Chinese companies are insulated from outside competition then in theory they should have a harder time developing globally competitive products. If we continue to allow TikTok and other Chinese products it is not without inherent benefits of increased competition driving better domestic competitiveness.

Of course it just all looks like we are getting screwed because TikTok is outcompeting despite all this, but banning or hobbling it will just make Facebook et al complacent and likely even less competitive in the global market.

We need the competition, basically, if for no other reason than the fact that a competitive market is what underpins healthy capitalism.

Plus, subsidies are simply another form of protectionism and the US heavily engages in this too. We can’t pick and choose when protectionist policies are applied because everyone is doing it in certain industries.

I make widgets, you also make widgets. I can sell my widgets in your location, minimal to no restrictions.

You can't sell your widgets in my location. Would you as a seller of widgets think that is fair?

I know the reality is more nuanced than that but people are talking about reciprocal agreements to at least ensure some sense of fairness.

Taking a random stab: one argument could be that competition drives down profit margins. By reducing competition, China makes their tech artificially profitable locally, allowing them to compete in international markets on an uneven playing field.

It’s basically a subsidy to their tech and AI industry. Same effect as US corn subsidies making American junk food exports endemic.

US companies like Meta, Google, are banned in China. Chinese companies are not banned in the US. US investors are barred from making controlling acquisitions of Chinese companies. Chinese investors are free to gain ownership in any US company they like.

The rest of the world is generally playing on a level globalist playing field of free trade and open competition. The theory for decades has been that if the world treats China like every other country and then over time they will become more open. But this theory has been disastrously wrong. China’s communist party is a mercantilist country where the government and private industry act together as one.

> Chinese companies are not banned in the US

Huawei/China Telecom/etc. notwithstanding, though they are not exactly social media competitors vs. Google/Meta.

Chinese companies are not categorically banned. Huawei had to do more than be Chinese.

I think you can still buy an iPhone in China, but the only Apple services that appear to be available are the App Store (some apps such as VPN apps and news apps are obviously unavailable) and Apple Music.

Usually services in China are run by a local partner.

> reciprocity clauses are very common in areas like [...]

Distributing software for you to run on your own hardware is speech, though, and it's protected by the first amendment. You can license the distribution of your own software if you want, but you can't tell me I can't give you software if you want it.

Basically: how do you think this would work, in a way that wouldn't also make Linux or gcc or whatever available only at the whim of the government?

We aren't talking about TikTok as an open source software repository. Their registered business, operations, leases/property purchases, payroll, advertising, data mining, international currency transfer and lots more are all not covered by the first amendment and can absolutely be regulated under a million clauses.

I'd be OK with all of that. Sanctions are a thing. Regulation of data storage is a thing. There's space for debate here. But none of that involves logic like "You can't distribute software in my country if you don't let me distribute software in yours", which was the first amendment violation you started with.

You are the only one who framed it in that way.

And the "software is free speech" argument itself doesn't apply when we are talking about something malicious that is installing keyloggers and transferring private data to overseas servers.

I think it still applies even to "malware". It's just irrelevant. I don't understand GP's argument here either.

TikTok is not an American citizen. Nobody is preventing American citizens from printing the source code of TikTok on their tshirts so that people can compile it and use it. This is the only conceivable scenario where the 1st amendment would apply.

And even if that was happening, the US could rightfully ban use of Chinese owned servers in the US. Then we'd get what happens in China: a US-owned entity forms to run TikTok in the US. It is now subject to US rules and regulations etc.

The first amendment applies to US law and the rights of US residents, not to foreign multinationals. The USA can and does restrict the speech of non-Americans in America, such as with respect to political campaign funding.

Plus, criminal speech can be restricted in any case. If it's determined that the TikTok app is violating the law or facilitating the commission of criminal activity, the distribution of that app could itself be deemed a crime, or even worse for app stores, subject them to civil liability.

> Distributing software for you to run on your own hardware is speech, though, and it's protected by the first amendment.

This definitely needs a reference.

This is a strawman argument. No one is telling to stop them from distributing software. Just remove the TikTok servers from operating.

Honestly, this type of discussion is seriously irritating, because it implies that TikTok is doing something unique that other apps aren't doing. Just as the article demonstrates, many western countries do the exact same thing that TikTok does, except TikTok seemingly takes it one step further (probably because of shoddy programming). Applying geographic-based arguments to technology is just a bandaid. The problem needs to be solved in all situations, not just in situations where people aren't politically happy.

Any company injecting keyloggers or monitoring systems into web content should be subject to the same equally damning judgement. Just because it's China doesn't make keylogging bad. Keylogging is bad because keylogging is bad. Companies like Fullstory [0] and Hotjar [1] are used all over the western internet and effectively act as full session recorders. Sure, used well they can be used for analytics, but you could just as easily inject Fullstory or Hotjar into an in-app browser and suddenly record all data a user does. Should this be possible? No. Does it help to just ban China? I mean sure, but why should you be okay with a western company doing it?

TikTok is a short video app used mostly by younger generations. It produces highly accurate recommendations for videos to watch. We're not talking about something like a banking app, a healthcare app, or even a messaging app. It's a video-based social network. There are bigger fish to fry than TikTok in almost every single possible category of app. Yet, TikTok is always brought up because it's from China.

[0]: https://www.fullstory.com/

[1]: https://www.hotjar.com/

TikTok is brought up because it has an insane amount of influence on the culture and identity of a huge swath of people. Do you seriously believe that China, or any country, would not want to leverage such influence to persuade or alter the culture or a potential advisory?

We all shit our pants because Russia used Meta, and American company, to influence the 2020 election. Imagine the same amount of data, a more accurate algorithm, and entirely within the control of foreign actors.

It doesn't matter if it is China or Colombia or Japan, a foreign company have that much influence over the opinions citizens of a country is dangerous.

Who are you, Xi Jinping? You basically word for word translated their foreign social media policy. Luckily we live in a capitalist free market, free competition ideology and not a heavy protectionist centrally influenced market economy here in the US.

Just because it is a policy of China, and as I am _not_ Mr. Jinping, I will take your word for it, doesn't mean it is incorrect. Some things work well in free markets, some don't. Maybe the ability to influence millions of people is a thing that isn't so great in an unregulated market.

> Maybe the ability to influence millions of people is a thing that isn't so great in an unregulated market.

This is actually the underpinnings of the free market and free speech. It's the ability for everyone to influence everyone else. What do you think speech is? It's the ability to say things that may influence others... and we let people think for themselves whether they should get influenced or not. Once we decide to think for others and choose what's best for other's, we'll have become the authoritarians.

> TikTok is a short video app used mostly by younger generations. It produces highly accurate recommendations for videos to watch. We're not talking about something like a banking app, a healthcare app, or even a messaging app. It's a video-based social network. There are bigger fish to fry than TikTok in almost every single possible category of app. Yet, TikTok is always brought up because it's from China.

If the leaders in the West weren't concerned about the "average Joe" and their (mis)understandings of politics and situations with complex nuances, then the West would likely be a true Democracy (like ancient Athens, where the People vote on issues such as War and Taxes) instead of a Republic or Democratic Republic (where the People elect a small group to vote on their behalf).

Regardless, I think our Western leaders SHOULD be concerned with the "average Joe" mentality. That includes, by a wide margin, propaganda efforts by other nations.


There are _far less_ antisocial practices featured on Chinese TikTok than on Western (specifically American) TikTok. However, the comparison to Instagram and Facebook doesn't differ all that much, so maybe they're simply giving us the content we want.


And I don't just mean the politicians. I mean downright to the pension funds, hedge funds, and retail investor.

They are all long China and especially Chinese tech. If you start declaring war on Chinese tech you are going to obliterate a huge amount of money all to protect the privacy that US voters don't care about privacy in the least. So why would they do such a silly thing?

National security? Please, the son of a sitting President is a crack user with huge ties to China. Nothing some Tiktor user could divulge through the in app browser could ever compare.

If you want to protect the privacy of users then protect the privacy of users. Protecting the privacy only when China is the one invading privacy is not protecting the privacy of users.

> how we can allow a Chinese social media app in the west, while any non-chinese social media apps aren't allowed there?

Because we are the West, and China is China. We have different laws and customs.

Why does that mean that a Chinese social media app can capture data unlawfully under GDPR, CCPA or or other regulations?

Any app built and run by any country can capture data unlawfully. The keyword is unlawfully.

It doesn't.

If that is happening then cases under those legislation would succeed. But those legislation don't somehow magically forbid practices that people on HN don't like.

It doesn’t mean that, and the comment I was responding to wasn’t talking about that, but merely the fact that the app is Chinese.


Given they are operating in countries like the EU, US, etc and they are doing the same privacy violations and actions like what Facebook did years ago but worse, and even after regulations such as GDPR, CCPA, etc and Facebook was fined in the billions by the FTC, TikTok should be no exception and must be fined in the billions for this invasive and repeated privacy violations.

Nothing has changed, even after the invasive tracking done by Facebook, and Instagram.

You will find that HN is full of American business owners that are happy to unlawfully capture data protected by GDPR.

So, I see this bandied about a lot, but I don't see the big deal in being spied on by a government that has 0 say in my entire hemisphere? Like, I have much bigger concerns about spying done on behalf of the five eyes alliance than China (obviously this would be the opposite if I was living in China). What are they going to do with my silly viewing habits, sell my data to advertisers? Well, same deal with youtube, google, fb, insta, whatsapp, etc. I'm not saying you are coming at this from a nationalistic point of view but I get that vibe from the ease of which tiktok is disdained on HN.

And on the merits, it is unhealthy like all social media, but it still feels so much more fun and worthwhile than facebook or insta where everything feels like a competition to have the best life. So much of Tiktok still feels like vine 2.0

> So, I see this bandied about a lot, but I don't see the big deal in being spied on by a government that has 0 say in my entire hemisphere?

You idiot.

All china has to do to have a serious negative impact on our society is give a slight boost to moronic, antisocial content (tide pod challenge or mass robbery anyone?), and a slight penalty to constructive, educational content. It would be basically impossible to detect this.

Remember that this is a country that regularly threatens a war that would likely involve the US.

After having spent some time with senior citizens, it's really hard to imagine that Tiktok could ever come close to having as much as a "serious negative impact" on US society as Fox News.

Besides what's been said already, did you consider that "the west" is a collection of countries from at least 3 continents, wgile China is a single country?

Also the fact that the entire world relies on China is a pretty good place to start.

So, what would be the difference between us and them? There is a reason why our governance is better than them.

Also, if you don't know facebook, instagram also have same issue as tiktok. Maybe government should enforce privacy requirement for all apps including facebook and instagram instead of blanket banning Chinese apps.

Because China is ruled by technocrats who are probably book-smarter than Western politicians.

In the west you typically have to be rich to be a politician, in China you have to be smart, then you get rich(and ban the NYT when your corruption is uncovered).

Lololol techno what which one?

Does it bother the west's rich and/or powerful? If not, it doesn't matter in the West apparently.

China and the West are both controlled by factors not really in line with helping the stereotypical Common Person.

We’re not a dictatorship?

This nutjob honeypot tastes delicious.


Just two more years and we have another chance to reverse course.

I would zoom out a bit.

For example, when the media in The West "front pages" the smog in Beijing keep in mind The West owns a good part of that. It's not like what's manufactured in China stays in China. I would presume their water ways are nasty as well.

Just one example mind you. The point is, there are other imbalances. That's not to say TikTok should get a free pass, only that it's complicated than an app for app comparison.

Amusingly, TikTok isn't available in China - only DouYin, which is similar but separate.

I'm not 100% sure on this at this point, but I think if Facebook/Google/etc were willing to do the same they would be allowed in China too, but as it stands they can't/won't comply with Chinese law (I may be mistaken on this, haven't read up on the topic in quite some time)

Yeah, and both TikTok and DouYin are owned by ByteDance. In fact didn't Google on occasion create a crippled/censored version of its search for some time in mainland China or Hong Kong or something?

I think they did, but then found it too much effort to maintain (I think there was also some hacking scandal? I forget)

For what it's worth HK internet presently uncensored, though ironically TikTok pulled out of the HK market as they felt it was too expensive to comply with Hong Kong laws given the size of the available market here.

DouYin is still available in HK though -- not sure if DouYin is available in US/Euro market or not??

I believe they pulled out because of the new national security law, which allows police to request data without any warrants.

It’s some somewhat ironic, because TikTok is Chinese owned, and so is the NSL.

Who cares? This is about privacy and security. Not a “why can’t we do it in your country back to you” argument

Sounds like the opposite of housing from a national security POV. If a Chinese national buys a house in the US, then the US has 'control' over their property. The US would want Chinese nationals to buy houses in the US.

In some countries housing supply is limited and the housing market can be messed with by influx of foreign ownership. Possibly less of an issue with US due to size of the country. Still, I think if someone can buy land here, we should be able to buy land there (within reason)?

If the news is to be believed, housing supply is limited in the US.

US Housing is generally a safe investment for foreign investors. Since US vestigial racist policies make it difficult to create dense, affordable housing, single family homes are in high demand and relatively limited supply.

Just tax the hell out of that property and use that money to build more housing. Much like many countries charge foreign students more and use that money to educate their own citizens.

There is an interesting meta discussion here but the parent is over-simplifying things.

> How we can allow a Chinese social media app in the west, while any non-Chinese social media apps aren't allowed there?

Easy. The laws are different.

"Non-Chinese social media app"s are not banned in China, just that if you run one it need to be licensed (https://beian.miit.gov.cn/) first before you can start servicing. Licensing is difficult since there's requirements about keeping data domestic, having physical presence should legal enforcement be necessary (i.e. there are people to arrest if something goes wrong), and complying with takedown requests (both copyright and political). Western big tech companies (rightfully) do not want to comply, so they do not get licenses, and thus have no presence. Attempting to "just provide service" without a license will result in blacklisting via the GFW as enforcement.

"Allow a Chinese social media app in the west" -- this is also more complex. If TikTok or friends violate laws in the west they are also liable for any punishment. For example, TikTok and WeChat comply with the GDPR in Europe and keep EU data local to the EU. If they didn't they'd be looking at a potentially huge fine and possibly getting banned. Similarly they also comply with copyright stuff like DMCAs. If they didn't, the FBI can seize their domain and compel ISPs to not resolve it just like the GFW (this has precedent and has been done before).

So the meta question becomes: Are the current protections in the west sufficient? To which the answer is probably no.

But in any case, in the free world, whether a Chinese social media app's presence is allowed to be maintained should not be dictated by ideology, but rather through real demonstrated evidence of misbehavior and/or harm (which is why research like this is important).

I appreciate your thoughtful response. I think that Chinese apps should at least be held to the same standards, as they are there, and I think it's reasonable to assume that they currently aren't.

The thing is, and I don't believe this to be controversial, that China has built a digital database of all (or most) of its citizens based on the data they collected. Now the question is, do they stop there, or do they have a file on all of us? The technology is cheap, and I think based on video data etc that they collect through apps like this, they might well build a social graph of the rest of the world (i.e. who does exist, what are their interests/beliefs/political affiliations, and what are the relations between those entities.)

The repercussions of using such apps might be, that they have info on citizens in the rest of the world, which might allow them to nudge people into giving into their political goals (this has already been happening after people posted stuff critical of China on sites like Twitter) - and I think that we have to ask ourselves how that could threaten our democracy.

> I think it's reasonable to assume that they currently aren't.

I don't see any reason they wouldn't be? If anything they probably face more scrutiny than US domestic companies exactly because they are foreign. The problem (at least in the US) is just that behavior like in this post should be illegal but it isn't (yet). They _feel_ ethically wrong but there's no punishment for doing it.

> (...) that China has built a digital database of all (or most) of its citizens based on the data they collected (...)

But so do companies like Google, or Meta, or Clearview etc... This is a real problem but Chinese companies are hardly alone here and they aren't even the first to start mass data collection. As for the domestic data collection and association, that's largely a domestic issue that their citizens need to figure out for themselves. For what it's worth, most countries do at least a little bit of domestic surveillance (as seen from the Snowden leaks), China just has a much more robust system with fewer safeguards.

> I think that we have to ask ourselves how that could threaten our democracy.

That is a good question and I think it should be asked of all tech companies.

Facebook had the whole election meddling thing which started the gears turning in legislative branches of how we might reign in companies as instruments that threaten democracy, and by now we all more or less assume countries like Russia and China will try to exert influence in other countries. However, getting the regulations right is hard even though it is also important. We'll need both experts in the technology (re: this whole thread about discreet behavior tracking that a layperson would never identify) and in the legal space to figure out how to protect individuals. This is not the cold war era. It should not be a battle of ideology. We should instead figure out how to protect people from institutions of power, be it hostile foreign powers, domestic tyranny, or just corporate greed.

The US already has said files, no? That's what the Snowden whistleblowing was about.

Only data specifically about Americans(and Americans alone, contact with a foreigner is open to data collection) that hasn't traveled in and out of the country is protected from the spies, if the spies are to be trusted. They're already known to be lying to Congress, so chances are the American government has a file with all of your social media activity, except maybe your tic tock usage.

I see no reason to consider the Chinese apps special in this regard. American domestic apps have already shown themselves to be dangerous to american democracy, and the American government can do much worse things to Americans than the Chinese government can. The data collection itself is bad, but no government will cut off its own spies

> do they have a file on all of us

I would be astonished if they did not. The data is freely available and inexpensive, I imagine they are hoovering it all up constantly.

What I don't understand is why Google has let YouTube become one big advertisement for TikTok. Every video I watch on YouTube is preceded by a TikTok ad.

> why can [XXX] nationals buy housing here, while I can't do so there?

Simply because when XXX nationals come with all cash offers and willing to pay above market & waive all contingencies, sellers are willing to sell.

It just so happens that certain nationals are more prone to having that sort of money than others.

No, it isn't about people being more prone to buy property in one place, rather than another. Let x be a any number in [0, infty), I literally can not buy property in China for any x.

> The answer is yes, foreigners are allowed to purchase property in China! The essential requirement is that you have studied or worked in China for at least one year on a residence permit. Foreigners are allowed to only own one residential property for dwelling purposes. You may not rent out the property or act as a landlord. Requirements and restrictions may differ in different provinces and cities. For example, Shanghai requires that non-Shanghai hukou families, including foreigners, have to provide proof of income tax or social insurance to the local government.


So to be more precise what you actually can't do is speculate in Chinese real estate.

You can not actually buy property in China, you can only lease it for a number of years, and it will always be held by the government of China (you can easily search this on the web). And after some number of years, it'll go back to them, and you'll have nothing.

I think you missed my point.

The US is a capitalist society; if you have sufficient money US National or not, you have nearly carte blanche to do what you want.

Regardless of China et al laws for foreign home ownership, the US is very permissible simply because money.

All of this. And, to be clear, much of that home purchasing is for investment purposes (vs simply Chinese nationals with residences here).

And, don't forget farmland.

Seems we'll look back on all of this at some point and decide maybe it wasn't the best idea.

> Seems we'll look back on all of this at some point and decide maybe it wasn't the best idea.

If that happens, I imagine our Congress will brew up some justification for seizing all that Chinese owned property.

Because of unfortunate politics - young people are thriving on TikTok so all discussions on limiting the platform under Trump were reasonably responded to with outcries about censorship. I think it's possible some change could happen under the current administration's watch (since it wouldn't be viewed as a free-speech crackdown) but there doesn't seem to be much interest now that it's just about security and not also about punishing your political opponents.

Because west operate under different systems. West has for while being about free trade free market global capitalism. Where as China is using much more controlled approach.

Fundamentally west can't get too faraway from these ideals or it will end up destroying its hegemony. Huawei has already been banned, but what comes after social media? And if some action is taken, will other countries start banning western imports specially cultural and services?

The corporations that control our government depend on China’s cheap labor. It’s as simple as that.

I can’t understand how we allowed every industry to wholesale migrate to China and write off every manufacturing method and trade secret.

The answer both of our questions is of course money. Our version of capitalism is dominated by cult-like disciples of financial management principles.

If the US fucks with TikTok, well maybe they’ll mess with Office 365.

If non-Chinese companies are willing to abide by Chinese laws (including those about censorship, etc.), they'll be able to operate in China. Chinese social media apps abide by US regulations around social media and private surveillance, which are almost nonexistent, so they can operate in the US.

The only way to prevent this is to create laws specifically targeting the Chinese for being Chinese, because 1) the chance for domestic regulation on social media and surveillance is very low, and 2) any regulation we're likely to pass would be about "spreading misinformation" and "foreign interference," so would probably end up closely resembling Chinese regulations.

Well, it's gonna cost me many downvotes, but this needs to be said. CCP has a tight grip on many US officials. The two publicly known cases are Pelosi's son and Biden's son, who are prominent investors, board members even, in chinese companies. That's public knowledge, but I bet it's the tip of the iceberg.

Trump tried to ban TikTok (and quite a lot more), but he’s orange and bad, so Biden repealed it. And tariffs are racist, so there’s that. America is not functioning well at this point and nothing indicates it will improve.

What happened to free speech being the bastion of America and the only thing that can counter misinformation and propaganda?

Suddenly doesn't seem to work so well when a Chinese app is granted that privilege.

Stealing information without user permission is not free speech.

Tell that to Facebook and LinkedIn. I don't get the double standard. These practices should be illegal, full stop. Why is it ok for US companies to do the same kinds of things?

It is not a double standard. There are already legal and cultural limitations in the US that have much more respect for user consent, user privacy and intellectual property than in China.

Any US company caught putting arbitrary keyloggers in products can and should be condemned. Companies still track large amounts of data and pull shady antics, but the big difference is there is a means of holding US companies to account if they violate privacy standards, not least of which is through uncensored condemnation and legal action. That is not possible in China.

More stringent privacy norms and protections in the US would be welcomed. That doesn’t mean the status quo is comparable to China.

> the big difference is there is a means of holding US companies to account if they violate privacy standards

Have yet to see this in practice. What usually happens is a bunch of articles are written "condemning" their actions, they are fined some ridiculously small amount and then business continues as usual.

The most recent action that seems to have had a significant impact on how Facebook captures data is Apple's "Ask App Not to Track". This is not exactly a shining example of the how the US system protects users privacy as the action was taken by a company, not a regulator.

That is more than what happens in China, and the demand for better privacy practices in the US is allowed to persist, build, and find its way into legislation and business practices of competitors.

US companies and regulators do not have to be shining beacons of user privacy and protections to be better than a system with no boundary between the state and private companies, with no expectation of privacy, and with censorship of opinion that criticizes shortcomings of the state.

Freedom of speech has two associated actions - speaking and listening - each with the same aspects of freedom - whether, when and to whom to speak/listen.

For example, we normally think about the opposite of free speech as speech being suppressed, but being made to speak, to people you don't wish to speak to, at a time that is not of your choosing, none of that is freedom of speech even though you expressed your thoughts.

Hence, there is no freedom of speech without privacy. That's why it often gets wrapped up in the, in my view far better, phrase freedom of expression.

How is stealing users credit card information and all keystrokes free speech again ?

Reading is tough, but the parent comment is about allowing TikTok to exist in the west.

Also, as mentioned in the first sentence of the article, this is exactly what Meta does in the Facebook and Instagram apps.

Wow pretty snarky.

I’m not saying that others don’t do it. Just that it’s not speech ?

Because only US can buy cheap goods and services from the world with printed paper called dollars.

It's amazing. Tiktok has been HN's darling for the longest.

We must be on different HNs because every time I see Tiktok brought up a bunch of people complain about privacy and the culture on the platform.

No way, it used to be almost universally praised here 2-3 years ago. Not so much recently: https://news.ycombinator.com/item?id=28133017

Because the opposite would be considered racism and xenophobia.

Because it’s a sovereign country that makes its own rules? So, basically the same reason that you can’t just move to Italy because you feel like it.

As a matter of fact, I can, as a European citizen (basically)[0].

[0] https://www.unipi.it/index.php/welcome-and-support/item/7413...

And what is wrong with sovereign countries adopting reciprocal policies, as OP proposed?

So uh - how is that Great Firewall thing in China legal then?

Trade limitations have always and will always exist. Heck there are hundreds of limitations in trade between the US and Canada - including the complete illegality of Kinder Eggs in the US, which I still find hilarious.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact