Results 1 to 2 of 2

Thread: sql injection

  1. #1
    paul.scherrer is offline Member
    Join Date
    Sep 2010
    Posts
    5

    Default sql injection

    Hi, I have been using sugar for our non-profit for about a year now and it has been very successful. However, in board meetings, the security of our data has come up over and over again. One question has been about the SQL injections. Is sugar vulnerable to this, and if so, is there a fix, patch for it?

  2. #2
    robertbmirth is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Irvine, CA
    Posts
    345

    Default Re: sql injection

    Sugar seems to correctly escape the majority of the inputs given to it, both for html and sql, and thus is not vulnerable to sql injections. I say 'majority of the inputs' because there are a few instances where sugar double escapes, but that doesn't present a security issue. If you want to test this yourself, just go to any text field in sugar and try inputting something with a single or a double quote followed by sql syntax.

    If you want to see the code for this, you can find it by fishing around the SugarBean.php file under data and DBHelper.php and DBManager.php files under include/database. Like anything in the core of Sugar these files are somewhat convoluted as far as extracting meaning, but you can get a general idea by looking at the save() function in SugarBean and the quotes() function in DBHelper and DBManager.

    On that note, however, if you create custom code where you directly speak to the database, i.e. you use $bean->db->query(); (or even more grossly, mysql_connect() and mysql_query()), you can create a security hole if you are not careful. Its best to use the bean interface whenever possible.
    Robert Beckman
    Software Engineer
    Mirth Corporation

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SugarCRM Unspecified SQL Injection Vulnerability
    By kinshibuya in forum General Discussion
    Replies: 8
    Last Post: 2011-09-26, 02:08 AM
  2. exploit script injection error
    By dvera73 in forum Help
    Replies: 3
    Last Post: 2010-07-21, 11:12 PM
  3. sql injection - id field
    By blackradius in forum Developer Help
    Replies: 4
    Last Post: 2010-04-21, 04:21 AM
  4. Replies: 0
    Last Post: 2007-11-04, 05:28 PM
  5. SQL Injection/Overwrite
    By sunside in forum General Discussion
    Replies: 4
    Last Post: 2007-04-18, 11:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •