escape string

Discussions on developing plugins for the Cacti Plugin Architecture

Moderators: Moderators, Developers

Post Reply
Author
Message
Rno
Cacti User
Posts: 377
Joined: Wed Dec 07, 2011 9:19 am

escape string

#1 Post by Rno » Wed Feb 13, 2019 11:29 am

Hello,
With the new version of PHP you cannot use anymore the mysql_escape_string
is there a function into cacti the allow me to have the sqli or PDO function to escape some string for DB process ?

I have some string I have to write into the DB that need to be escaped .
Production
CentOS
php 7.4
mariadb 10.5.0
Cacti 1.2.9
Spine 1.2.9
RRD 1.7.2
thold 1.3.2
monitor 2.3.5
syslog 2.4
weathermap 0.98a
Own plugin:
ExtendDB 1.1.3
LinkDiscovery 1.3.2
Map 1.2.8
Test
CentOS
php 7.4
mariadb 10.5.0
Cacti 1.2.9
Spine 1.2.9
RRD 1.7.2
thold 1.3.2
monitor 2.3.5
syslog 2.4
weathermap 0.98a
Own plugin:
ExtendDB 1.1.3
LinkDiscovery 1.3.2
Map 1.2.8

User avatar
Osiris
Cacti Pro User
Posts: 889
Joined: Mon Jan 05, 2015 10:10 am

Re: escape string

#2 Post by Osiris » Sun Feb 24, 2019 7:36 am

db_qstr() is the function.
Before history, there was a paradise, now dust.

Post Reply