Audit localhost / 127.0.0.1 URL

Hi,

I was just trying to add a contract to a site in dev mode, so using an internal DNS domain dedicated to dev site. But the form do not want to valid my url because, I think, the validation function want a valid domain suffix (like .fr .com …).

For example, http://mysite.local/ does not work.
http:/:mysite.local.com/ do work.

Can it be possible to modify the validation function in order to be able to test dev site ?

(I’m using the docker version)

1 Like

Hi @Blink38
Thanks for your report.

@mfaure and also

some tests

http://mysite.com ----> it works
https://mysite.com ----> it works
http://mysite.com:8081 ----> it works
https://mysite.com:8081 ----> it works
http://login:pass@mysite.com
https://login:pass@mysite.com
http://login:pass@mysite.com:8081
https://login:pass@mysite.com:8081


http://91.198.174.192 ----> it works
https://91.198.174.192 ----> it works
http://91.198.174.192:8081 ----> it works
https://91.198.174.192:8081 ----> it works
http://login:pass@91.198.174.192
https://login:pass@91.198.174.192
http://login:pass@91.198.174.192:8081
https://login:pass@91.198.174.192:8081


http://www.citroën.fr
https://www.citroën.fr
http://сервис-трезвый-водитель.рф
https://сервис-трезвый-водитель.рф


http://localhost
https://localhost
http://localhost:8081
https://localhost:8081
http://login:pass@localhost
https://login:pass@localhost
http://login:pass@localhost:8081
https://login:pass@localhost:8081


http://127.0.0.1 ----> it works
https://127.0.0.1 ----> it works
http://127.0.0.1:8081 ----> it works
https://127.0.0.1:8081 ----> it works
http://login:pass@127.0.0.1
https://login:pass@127.0.0.12
http://login:pass@127.0.0.1:8081
https://login:pass@127.0.0.1:8081


http://mysite.local
https://mysite.local
http://mysite.local:8081
https://mysite.local:8081
http://login:pass@mysite.local
https://login:pass@mysite.local
http://login:pass@mysite.local:8081
https://login:pass@mysite.local:8081


http://192.168.1.25 ----> it works
https://192.168.1.25 ----> it works
http://192.168.1.25:8081 ----> it works
https://192.168.1.25:8081 ----> it works
http://login:pass@192.168.1.25
https://login:pass@192.168.1.25
http://login:pass@192.168.1.251:8081
https://login:pass@192.168.1.25:8081

Hi @Blink38, thanks for your feedback. Initially, Asqatasun was meant to run on public servers on the net and in the past (~5-6 years ago) we had user mismatching their local and real URL. Time has changed, Docker image has arrived, we need to remove this !

In order to enhance the specification of the tests we should do (or not), could you tell us how mysite.local is revolved ? What is the IP address associated ? More precisely, is it a local one (192.168.x.y, 172.16.x.y, 10.x.y.z) or a public one ?

@fabrice your last example “citroën.fr” is valid but from a different class: domain with accents. I suggest we deal with this in a second time

My DNS is an internal DNS which resolve our internal domain. It forward external request to external DNS.

IP Addresses can be private IP or public IP.


Nous utilisons un DNS interne pour résoudre notre domain interne. Ce DNS transfert les requêtes externes vers un DNS externe.

Les adresses IP peuvent être aussi bien privées que publiques (même si nous utilisons ces adresses publiques de manière privée).

Hi @Blink38,

I spent a few hours digging the Docker network stack to get this :

In fact, I do not reproduce your issue. Analysing local URLs is possible and feasible. But there is a trick do to Docker way of dealing with network.

Short version:

Grab the IP of your docker0 interface, and use it as the URL to analyse. This way you analyse the website served by your local Apache (or whatever webserver).

To find this IP address, just run ipconfig.

Long version:

To troubleshoot your issue, I need to know how mysite.local is resolved. Said differently, where is your web server ? I assume on your machine, i.e. the host of the Docker image. Now how is it configured, is mysite.local bound to 127.0.0.1 or another IP ? If another IP, is this IP attached to your host ? And is it the only IP address of your host ?

Could you share the result of:

  • host mysite.local
  • and if possible dig -t any mysite.local

My point is : you may have a complex DNS configuration that may not be related to an Asqatasun issue :slight_smile:

PS: on peut aussi passer en français, pour cela il faut faire “Reply as Linked Topic” à droite de l’âge du message (afin de ne pas mélanger les langues dans un fil de discussion)

More info through my debug session:

All the following local URLs are analysed correctly, on a fresh install without Docker:

  • http://127.0.0.1/manivelle-web/
  • http://localhost/manivelle-web/
  • http://localhost:8080/asqatasun/

The “localhost” question seems to be a Docker issue as I mentioned in the previous post.

EDIT: this is OK for page-audit (site-audit to be tested)