Giter Club home page Giter Club logo

namecointobind's People

Contributors

khalahan avatar ryancdotorg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

namecointobind's Issues

Should test the validity of domain names

There are currently in the blockchain some domains which are valid according to the DNS but not according to the stricter LDH rule of host names. BIND, by default, reject them and therefore cannot load .BIT :

Jan 18 17:29:17 ludwigVII named[23967]: /etc/bind/dotbit/db.namecoin.bit:15421: jdt_test.bit: bad owner name (check-names)
Jan 18 17:29:39 ludwigVII named[23967]: /etc/bind/dotbit/db.namecoin.bit:22629: andrey_vasilyev.bit: bad owner name (check-names)

It would be good if namescan.php checked these names and have the ability to filter them out.

NS hosts are converted to ip and never updated

Here is an example with ns records :
{"map":{"":{"ns":["ns0.web-sweet-web.net","ns1.web-sweet-web.net"]}}}

ns0.web-sweet-web.net & ns1.web-sweet-web.net are converted to the following ip addresses 178.32.102.200 & 188.165.40.50 and those ip addresses are used by bind.

Due to the caching system, if ns0.web-sweet-web.net & ns1.web-sweet-web.net change their ip, the change will be ignored.

CNAME record together with other data found in blockchain BREAKS entire dot bit zone!

Hi, and excuse me for my not so good English.

Today I made everything as shown in Readme installing my own dotbit DNS. One wrong domain found in NMC blockchain has CNAME record together with DNAME, while CNAME can't exist together with another records as Bind says. When this domain goes into Bind config it BREAKS entire .bit zone!

I wrote a little piece of code to handle this bug and ignore broken zones.

name.class.php

Find

foreach($records as $record=>$values) {
                    switch($record) {
                    case 'email':
                        #$this->bindZones[$fZone]['email'] = $values[0];
                        #$this->bindForwards[$fZone][] = str_pad($subdom, 15, ' ').$rec[$record].'"Email: '.$values[0].'"';
                        $other_exists = true;
                        break;

Insert before

                $cname_exists = $other_exists = false;
                foreach($records as $record=>$values) {
                    switch($record) {
                    case 'alias':
                        $cname_exists = true;
                        break;
                    case 'email':
                    case 'translate':
                    case 'ip':
                    case 'ip6':
                    case 'ns':
                        $other_exists = true;
                    }
                }

                if ($cname_exists && $other_exists)
                {
                    continue;
                }

After this fix everything's OK.

got it up and running

got everything up and running great, but I had to manually remove these names from the zone in order to get named running. should we create some kind of filter in namescan.php for these or ....

db.namecoin.bit:17: -.bit: bad owner name (check-names)
db.namecoin.bit:18: *.-.bit: bad owner name (check-names)
db.namecoin.bit:30: --.bit: bad owner name (check-names)
db.namecoin.bit:31: *.--.bit: bad owner name (check-names)
db.namecoin.bit:100: .bit: bad owner name (check-names)
db.namecoin.bit:101: *.
.bit: bad owner name (check-names)
db.namecoin.bit:209: n-.bit: bad owner name (check-names)
db.namecoin.bit:210: n-.bit: bad owner name (check-names)
db.namecoin.bit:211: www.n-.bit: bad owner name (check-names)
db.namecoin.bit:1905: exa-.bit: bad owner name (check-names)
db.namecoin.bit:1906: exa-.bit: bad owner name (check-names)
db.namecoin.bit:1907: www.exa-.bit: bad owner name (check-names)
db.namecoin.bit:2767: non-.bit: bad owner name (check-names)
db.namecoin.bit:2768: non-.bit: bad owner name (check-names)
db.namecoin.bit:2769: www.non-.bit: bad owner name (check-names)
db.namecoin.bit:2968: pre-.bit: bad owner name (check-names)
db.namecoin.bit:2969: pre-.bit: bad owner name (check-names)
db.namecoin.bit:2970: www.pre-.bit: bad owner name (check-names)
db.namecoin.bit:4069: giga-.bit: bad owner name (check-names)
db.namecoin.bit:4070: giga-.bit: bad owner name (check-names)
db.namecoin.bit:4071: www.giga-.bit: bad owner name (check-names)
db.namecoin.bit:4574: post-.bit: bad owner name (check-names)
db.namecoin.bit:4575: post-.bit: bad owner name (check-names)
db.namecoin.bit:4576: www.post-.bit: bad owner name (check-names)
db.namecoin.bit:12818: the_seven.bit: bad owner name (check-names)
db.namecoin.bit:12819: *.the_seven.bit: bad owner name (check-names)
dns_master_load: db.namecoin.bit:13043: bittacular.bit: CNAME and other data

Inserting invalid NS owners

RegEx needs to be added to filter out invalid wildcard NS descriptors.

---Errors in Syslog---
Nov 26 08:37:14 dns1 named[21283]: dns_master_load: /var/lib/bind/dotbit/db.namecoin.bit:15678: *.suzukibonto.bit: invalid NS owner name (wildcard)
Nov 26 08:37:14 dns1 named[21283]: zone bit/IN: loading from master file /var/lib/bind/dotbit/db.namecoin.bit failed: invalid NS owner name (wildcard)

---Entry in File---
suzukibonto IN A 178.63.16.21
*.suzukibonto IN NS ns11.orangewebsite.com.
*.suzukibonto IN NS ns12.orangewebsite.com.

Regex Accepts Invalid IP Address

Inside name.class.php the regex:

    $mask['ip'] = '@^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$@';

accepts ip addresses such as: 10.00.10.110 which causes bind to give an error.

This should be updated to a regex such as this:

^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

DS records not accepted by named, bad hex encoding

running named-checkzone bit db.namecoin.bit

get this kind of output:

dns_rdata_fromtext: db.namecoin.bit:15: near eol: bad hex encoding
dns_rdata_fromtext: db.namecoin.bit:16: near eol: bad hex encoding
zone bit/IN: loading from master file db.namecoin.bit failed: bad hex encoding
zone bit/IN: not loaded due to errors.

where row 15 and 16 is:

puggan IN DS 6924 7 1 0B9DFCD37D37EB6D41EB7085EF603DEF4F7DD44079135F03085F3D080E39
puggan IN DS 6924 7 2 D80DC4DFB077DB6045D82D38DC3EB9F36DC1EFA0FC0F6100DBBE7803D040102D3DF7A03CEBCEFB085DB9135F04D85D75

Also a issue reported in fork: puggan#1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.