News for hackers. Stuff that matters.
Re:Bypass DeepSeek censorship by speaking in hex by dylan604 on Friday January 31, 2025 @03:39PM (#42891685)
It's precisely why I'm a such an advocate of server side everything. JS is fun to update the DOM (which is what it was designed for), but manipulating data client side in JS is absolutely bat shit crazy.
Re:Bypass DeepSeek censorship by speaking in hex by atomicnumber3 on Friday January 31, 2025 @04:07PM (#42892008)
I wish js (and, really, "html/css/js/browser as a desktop application engine) wasn't so bad. I was born into a clan writing desktop apps in Swing, and while I know why the browser won, Swing (and all the other non-browser desktop app frameworks/toolkits) are just such a fundamentally better paradigm for handling data. It lets you pick what happens client-side and server-side based more on what intrinsically makes sense (let clients handle "view"-layer processing, let servers own distributed application state coordination).

In JS-land, you're right. You should basically do as little as is humanly possible in the view layer, which imo leads to a proliferation of extra network calls and weirdly-shaped backend responses.

Re:Bypass DeepSeek censorship by speaking in hex by teeth-gnasher on Friday January 31, 2025 @04:11PM (#42892065)
The need to manage data access on the server does not go away when you stop using javascript. Is there something specifically about Swing that somehow provides proper access control, or is it simply the case that it is slightly more work to circumvent the front end when it doesn’t ship with built in dev tools?
Re:Bypass DeepSeek censorship by speaking in hex by dylan604 on Friday January 31, 2025 @04:16PM (#42892120)
The built-in dev tools is the key thing. If there was no way for the client to manipulate things, it wouldn't be too far off from other local apps. Reversing is always going to be a threat vector, but the low bar to entry of using the dev tools makes it a non-starter for me.

If using Ghirdra was as simple as using the dev tools, the software industry would collapse.

Re:Bypass DeepSeek censorship by speaking in hex by noman-land on Friday January 31, 2025 @04:40PM (#42892455)
The built in dev tools are fundamental to an open web. If you don't want someone to look at something in their own possession then don't send it to them in the first place. Obfuscating it is rude and is false security anyway.

The grand rule is don't trust the client. People break this rule and then try to paper over it with obfuscation, blame, and tightening their control.

Re:Bypass DeepSeek censorship by speaking in hex by dylan604 on Friday January 31, 2025 @05:03PM (#42892731)
That's not what I said nor meant, but sure, jump to that conclusion.

You wouldn't run a shopping cart app where the item counts and totals were calculated client-side. You get the item id and quantity, and have the server do that. Just like if you were censoring something, you wouldn't send the client the unredacted data and then let the UI make the edits.

No obfuscation is needed for any of that. Open web has nothing to do with any of this

Re:Bypass DeepSeek censorship by speaking in hex by stevage on Friday January 31, 2025 @05:26PM (#42893031)
Sometimes you do calculate prices client side. But you double check them server side.
Re:Bypass DeepSeek censorship by speaking in hex by dylan604 on Friday January 31, 2025 @06:05PM (#42893448)
That just feels like a "you're holding it wrong" type of thing, especially seeing how JS is held in such high regard for its floating point math accuracy.
Re:Bypass DeepSeek censorship by speaking in hex by stevage on Friday January 31, 2025 @06:33PM (#42893740)
Is that sacrcasm? Not sure what your point is.
Re:Bypass DeepSeek censorship by speaking in hex by wiseowise on Saturday February 01, 2025 @03:07AM (#42896737)
Both Java and JS adhere to IEEE 754, what’s your point?

Sure it doesn’t have BigDecimal, but you’re not going to write HFT in JS either.

Re:Bypass DeepSeek censorship by speaking in hex by vitus on Sunday February 02, 2025 @08:11AM (#42908403)
Re:Bypass DeepSeek censorship by speaking in hex by wayvey on Saturday February 01, 2025 @06:35AM (#42897629)
Ints should be used for currency calculations most of the time
Re:Bypass DeepSeek censorship by speaking in hex by DonHopkins on Saturday February 01, 2025 @12:06PM (#42899883)
Jesus, you sound like the X11 fanatics I used to debate with about NeWS, long before anyone had envisioned Google Maps or coined the term AJAX for what we'd been doing with PostScript since the 1980's.

The NeWS window system was like AJAX, but with: 1) PostScript code instead of JavaScript code 2) PostScript graphics instead of DHTML graphics, and 3) PostScript data instead of XML data.

https://en.wikipedia.org/wiki/NeWS

NeWS – Network Extensible Window System (wikipedia.org) 86 points by stevewilhelm on April 12, 2016 | hide | past | favorite | 76 comments

https://news.ycombinator.com/item?id=11477565

ScriptX and the World Wide Web: “Link Globally, Interact Locally” (1995)

https://donhopkins.medium.com/scriptx-and-the-world-wide-web...

PizzaTool was a NeWS front-end for ordering pizzas that had a price optimizer which would immediately figure out the least expensive combination of pizza style + extra toppings for the pizza you wanted. (i.e. ordering an "Tony's Gourmet + Clams" was less expensive than ordering a plain pizza plus all the individual toppings.)

Of course the untrusted client side user input was sent via FAX to the "server side" humans at Tony & Alba's Pizza, who validated the input before making the pizza, because performing input validation and price calculation and optimization in the front end via FAX would have been terribly inefficient. (This was in 1990, long before every pizzaria was on the internet, and you could order pizzas online, kids!)

https://donhopkins.medium.com/the-story-of-sun-microsystems-...

Re:Bypass DeepSeek censorship by speaking in hex by wiseowise on Saturday February 01, 2025 @02:54AM (#42896690)
Oh, wow. So you’re one of those. Disregard what I said in previous comment.
Re:Bypass DeepSeek censorship by speaking in hex by atomicnumber3 on Sunday February 02, 2025 @05:06PM (#42912330)
Did I say anything about access control? There's a big difference between "this has to happen server side for security reasons" and "this has to happen server side because our UI/client language is so hapless that it can't handle any amount of additional processing".
Re:Bypass DeepSeek censorship by speaking in hex by teeth-gnasher on Wednesday February 05, 2025 @12:24AM (#42944191)
The entire thread is about access control…

JS is perfectly powerful, if you don’t know how to use it that’s a good learning opportunity.

Re:Bypass DeepSeek censorship by speaking in hex by wiseowise on Saturday February 01, 2025 @02:53AM (#42896679)
> I was born into a clan writing desktop apps in Swing, and while I know why the browser won, Swing (and all the other non-browser desktop app frameworks/toolkits) are just such a fundamentally better paradigm for handling data.

No, by a large margin no. Java is a hostile language to prototype programs at which JS excels. Awful styling, walls of code just to get sane defaults (https://docs.oracle.com/javase/tutorial/uiswing/dnd/together..., seriously?).

Re:Bypass DeepSeek censorship by speaking in hex by homebrewer on Saturday February 01, 2025 @06:17AM (#42897556)
Swing is decades old at this point, its shortcomings have nothing to do with Java. JavaFX does not require this much boilerplate.

https://docs.oracle.com/javase/8/javafx/get-started-tutorial...

Re:Bypass DeepSeek censorship by speaking in hex by atomicnumber3 on Sunday February 02, 2025 @05:05PM (#42912315)
"And all the other desktop app frameworks." I refer to Qt and and the other desktop frameworks too. Having an actual language and runtime where the UI toolkit is just that, a toolkit. Don't focus on Swing, that's just what I'm familiar with.
Re:Bypass DeepSeek censorship by speaking in hex by fmbb on Friday January 31, 2025 @04:30PM (#42892324)
In this case it is not bat shit. It is rather smart to offload this useless feature in the client.

The requirements are probably that normal users should not see “bad content”. If users can break the censorship it is maybe not the chat operators fault. They made an effort to “protect” the user.

Re:Bypass DeepSeek censorship by speaking in hex by ChocolateGod on Saturday February 01, 2025 @04:34AM (#42897155)
> If users can break the censorship

Any user breaking the censorship likely knows already what the censor was blocking.

Re:Bypass DeepSeek censorship by speaking in hex by stevage on Friday January 31, 2025 @05:25PM (#42893011)
The last ten years of my career is basically all about manipulating data client side in JS. It works really well. In most cases I don't even need a server.

Obviously it isn't appropriate for all scenarios though.