How can I protect against SQL injection attacks using Perl's DBI?

后端 未结 5 1154
野趣味
野趣味 2020-12-08 07:04

Is there a function i can use in Perl to sanitize input before putting it into a MySQL db? I don\'t know regex very well so before I make my own function i was wondering if

5条回答
  •  無奈伤痛
    2020-12-08 07:10

    How do you call the database?

    DBI has support for prepared statements using placeholders. Both DBIx::Class and Rose::DB::Object sanitize values automatically, if you use the "find" method provided by each library.

提交回复
热议问题