escape string

Discussions on developing plugins for the Cacti Plugin Architecture

Moderators: Moderators, Developers

Post Reply
Author
Message
Rno
Cacti User
Posts: 350
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 .
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.45, Map 0.37

Test
Cacti 1.2.6
Spine 1.2.6
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.6
Map 1.2.6

User avatar
Osiris
Cacti Pro User
Posts: 863
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