Current time: 11-25-2024, 07:56 AM Hello There, Guest! (LoginRegister)


Post Reply 
Manual lines in DNS zone file
Author Message
Blondak Offline
Junior Member
*****
Dev Team

Posts: 84
Joined: May 2008
Reputation: 5
Post: #136
RE: Manual lines in DNS zone file
(06-26-2009 02:51 PM)Foggy Wrote:  Of course, IMHO a good idea.
Shouldn't you use mysql_real_escape_string? Does ispCp this anywhere?
Otherwise I would recommend to use something like this:
Code:
$_dns = empty($_POST['dns_name']) ? $record_domain . '.' : mysql_real_escape_string($_POST['dns_name']);
But else, I would be happy if this code goes to the svn repo...

I hope that mysql_real_escape_string is not nessesary, because ispcp uses PDO for SQL queries and its escapes inputs automatically.

EDIT: maybe better
Code:
$_dns = empty($_POST['dns_name']) ? $record_domain . '.' : encode_idna($_POST['dns_name'])

EDIT2: and the best Wink
Code:
--- edit_dns.php.backup    2008-08-12 08:06:12.000000000 +0200
+++ edit_dns.php    2009-06-26 12:19:38.000000000 +0200
@@ -363,6 +363,7 @@
    $_text = '';
    $_class = $_POST['class'];
    $_type = $_POST['type'];
+    $_POST['dns_name'] = encode_idna($_POST['dns_name']);

         list($dmn_id) = get_domain_default_props($sql, $_SESSION['user_id']);
    if ($add_mode){

Blondak
(This post was last modified: 06-26-2009 08:23 PM by Blondak.)
06-26-2009 07:28 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Manual lines in DNS zone file - Blondak - 07-10-2008, 08:45 PM
RE: Manual lines in DNS zone file - nuno - 07-12-2008, 05:28 AM
RE: Manual lines in DNS zone file - nuno - 07-18-2008, 01:24 AM
RE: Manual lines in DNS zone file - gutek - 08-14-2008, 02:46 AM
RE: Manual lines in DNS zone file - suw - 09-06-2008, 07:57 AM
RE: Manual lines in DNS zone file - mpages - 09-16-2008, 05:20 AM
RE: Manual lines in DNS zone file - Juz - 10-27-2008, 03:26 AM
RE: Manual lines in DNS zone file - Juz - 10-29-2008, 05:33 AM
RE: Manual lines in DNS zone file - BeNe - 10-29-2008, 07:21 AM
RE: Manual lines in DNS zone file - Juz - 10-29-2008, 03:51 PM
RE: Manual lines in DNS zone file - hnn - 11-20-2008, 07:28 PM
RE: Manual lines in DNS zone file - kaotix - 12-12-2008, 04:15 AM
RE: Manual lines in DNS zone file - TXC - 12-22-2008, 02:46 AM
RE: Manual lines in DNS zone file - TXC - 01-08-2009, 03:51 AM
RE: Manual lines in DNS zone file - TXC - 01-08-2009, 06:27 AM
RE: Manual lines in DNS zone file - xister - 01-28-2009, 02:42 AM
RE: Manual lines in DNS zone file - tango - 02-20-2009, 10:11 PM
RE: Manual lines in DNS zone file - FeG - 02-20-2009, 10:30 PM
RE: Manual lines in DNS zone file - CHBIE - 02-09-2009, 05:46 AM
RE: Manual lines in DNS zone file - tango - 02-20-2009, 10:56 PM
RE: Manual lines in DNS zone file - xister - 02-21-2009, 06:34 PM
RE: Manual lines in DNS zone file - tango - 02-21-2009, 07:36 PM
RE: Manual lines in DNS zone file - hnn - 02-24-2009, 07:01 PM
RE: Manual lines in DNS zone file - quash - 03-06-2009, 01:31 AM
RE: Manual lines in DNS zone file - quash - 03-09-2009, 10:07 PM
RE: Manual lines in DNS zone file - quash - 03-12-2009, 01:16 AM
RE: Manual lines in DNS zone file - quash - 03-17-2009, 09:03 PM
RE: Manual lines in DNS zone file - quash - 03-24-2009, 12:22 AM
RE: Manual lines in DNS zone file - quash - 03-25-2009, 12:18 AM
RE: Manual lines in DNS zone file - quash - 03-25-2009, 12:53 AM
RE: Manual lines in DNS zone file - quash - 03-27-2009, 07:50 AM
RE: Manual lines in DNS zone file - Foggy - 03-27-2009, 07:17 PM
RE: Manual lines in DNS zone file - Foggy - 03-27-2009, 10:02 PM
RE: Manual lines in DNS zone file - Foggy - 03-27-2009, 11:07 PM
RE: Manual lines in DNS zone file - Zothos - 03-28-2009, 01:10 AM
RE: Manual lines in DNS zone file - Foggy - 03-28-2009, 07:01 PM
RE: Manual lines in DNS zone file - sunsus - 05-04-2009, 08:15 PM
RE: Manual lines in DNS zone file - Haeber - 05-14-2009, 03:14 AM
RE: Manual lines in DNS zone file - sfera - 05-22-2009, 10:24 PM
RE: Manual lines in DNS zone file - sfera - 05-23-2009, 01:43 AM
RE: Manual lines in DNS zone file - sfera - 05-25-2009, 11:55 PM
RE: Manual lines in DNS zone file - sfera - 05-26-2009, 07:30 PM
RE: Manual lines in DNS zone file - bpratt - 06-04-2009, 09:07 AM
RE: Manual lines in DNS zone file - Foggy - 06-22-2009, 06:09 PM
RE: Manual lines in DNS zone file - BeNe - 06-22-2009, 07:16 PM
RE: Manual lines in DNS zone file - tango - 06-22-2009, 10:19 PM
RE: Manual lines in DNS zone file - BeNe - 06-22-2009, 11:11 PM
RE: Manual lines in DNS zone file - tango - 06-23-2009, 02:26 AM
RE: Manual lines in DNS zone file - Foggy - 06-23-2009, 07:19 AM
RE: Manual lines in DNS zone file - Foggy - 06-26-2009, 02:51 PM
RE: Manual lines in DNS zone file - Blondak - 06-26-2009 07:28 PM
RE: Manual lines in DNS zone file - Foggy - 06-28-2009, 05:47 PM
RE: Manual lines in DNS zone file - BeNe - 06-30-2009, 03:51 PM
RE: Manual lines in DNS zone file - Foggy - 07-02-2009, 04:53 PM
RE: Manual lines in DNS zone file - BeNe - 07-28-2009, 04:52 PM
RE: Manual lines in DNS zone file - TSG - 08-30-2009, 10:28 AM

Forum Jump:


User(s) browsing this thread: 42 Guest(s)