Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
G-Prime
Apr 30, 2003

Baby, when it's love,
if it's not rough it isn't fun.
Why not set up a server-side script that accepts predefined actions from POST actions, and leave the DB abstraction to that? You could make calls to that through AJAX and never expose the DB.

Adbot
ADBOT LOVES YOU

G-Prime
Apr 30, 2003

Baby, when it's love,
if it's not rough it isn't fun.

Pseudo-God posted:

I want to do it without a server-side script at all, but I guess the tech is not here yet.

Keep in mind, even if you found an elegant way to have user-run javascript authenticate to your DB in a secure way that the user can't hijack the credentials from (which doesn't seem possible), you're still relying on that script to make direct SQL queries, which hoses your security entirely. That's why you need the abstraction. Instead of blindly accepting queries, you've got predefined queries that the abstraction layer provides based on criteria that the user submits via the javascript.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply