1
stiffo
Having trouble with xoopsDb->query
  • 2004/11/15 22:52

  • stiffo

  • Just popping in

  • Posts: 9

  • Since: 2004/9/13


Don't know what happened to my previous post (with the same subject). Couldn't see it after posting it.

I had problems with xoopsDB. I though it had to do only with my "delete"-queries but after some testing I found aout that xoopsDB wouldn't do anything if the request to the page was with method "GET" (with parameters as cgi). If I requested the same page from within a form with method "POST" it worked.
Why does it behave like that? Is it a security thing? I haven't read all documentation I must admit...

Thanks!

/stiffo

2
Mithrandir
Re: Having trouble with xoopsDb->query

It is a security thing.

If the method is not POST or if the HTTP Referer check fails, XOOPS will not allow $xoopsDB->query() with anything but SELECT statements.

If you are in a secure environment, where you can trust the SQL query even though it is not submitted via POST and/or it is not with a valid HTTP Referer, you can use $xoopsDB->queryF() instead. This will go through regardless, but should only be used in these circumstances.

3
stiffo
Re: Having trouble with xoopsDb->query
  • 2004/11/16 22:50

  • stiffo

  • Just popping in

  • Posts: 9

  • Since: 2004/9/13


Ok, thank you very much for your reply!
That was a really good piece of information.
Now I don't have to wonder about that anymore.
My thumb is up for security constraints!

Login

Who's Online

504 user(s) are online (65 user(s) are browsing Support Forums)


Members: 0


Guests: 504


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits