Skip to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

O365 cname - Fehler oder Fehlbedienung

Featured Replies

Microsoft wünscht sich, dass ich u.a. "selector1._domainkey  1D IN CNAME    selector1-DOMAIN-TLD._domainkey.DOMAIN.onmicrosoft.com" im DNS verewige.

Also nutze ich den DNS-Editor auf Domainebene und fülle wie folgt aus:

Record : selector1._domainkey
Type : CNAME
Priority : ich lösche die vorausgefüllte "0"
Content : selector1-DOMAIN-TLD._domainkey.DOMAIN.onmicrosoft.com. (man beachte den Punkt am Ende; natürlich ersetze ich DOMAIN und TLD durch was  Sinnvolles)
TTL : 86400

Froxlor meint dazu aber "Ungültiger Domain-Name für CNAME Eintrag". Mache ich den Fehler (welchen) oder Froxlor?

That'S because the domainValidate which the content of a CNAME is passed to sees an "underscore" as invalid.

For your specific situation, a "workaround" would be to leave the underscore out of the URL to save the record, then add it directly via mysql/phpmyadmin again to avoid this validation. not nice, but will do

huch, wieso schreib ich englisch *kopf -> tisch* sry ?

  • Author

Wird denn die Funktion domainValidate perspektivisch entsorechend angepasst, dass sie auch den "_" zulässt?

Dann wäre sie ja nicht RFC konform... Muss ich mir was anderes überlegen für cname speziell

Würdest du die funktion in der Datei lib/functions/validate/function.validateDomain.php mit dieser ersetzen und mal schauen ob das hinhaut? Meine paar tests bisher gingen durch:

/**
 * Check if the submitted string is a valid domainname
 *
 * @param string $domainname
 *        	The domainname which should be checked.
 * @param bool $allow_underscore
 *        	optional if true, allowes the underscore character in a domain label (DKIM etc.)
 *        	
 * @return string|boolean the domain-name if the domain is valid, false otherwise
 */
function validateDomain($domainname, $allow_underscore = false)
{
	$char_validation = '([a-z\d](-*[a-z\d])*)(\.?([a-z\d](-*[a-z\d])*))*\.([a-z\d])+';
	if ($allow_underscore) {
		$char_validation = '([a-z\d\_](-*[a-z\d])*)(\.([a-z\d\_](-*[a-z\d])*))*(\.?([a-z\d](-*[a-z\d])*))+\.([a-z\d])+';
	}

	if (preg_match("/^" . $char_validation . "$/i", $domainname) && // valid chars check
	preg_match("/^.{1,253}$/", $domainname) && // overall length check
	preg_match("/^[^\.]{1,63}(\.[^\.]{1,63})*$/", $domainname)) // length of each label
	{
		return $domainname;
	}
	return false;
}

 

achso, ja und natürlich in der API an entsprechender Stelle das underscore erlauben:

diff --git a/lib/classes/api/commands/class.DomainZones.php b/lib/classes/api/commands/class.DomainZones.php
index 748006d2..9be1cbde 100644
--- a/lib/classes/api/commands/class.DomainZones.php
+++ b/lib/classes/api/commands/class.DomainZones.php
@@ -162,7 +162,7 @@ class DomainZones extends ApiCommand implements ResourceEntity
                                // add domain name
                                $content .= '.' . $domain;
                        }
-                       if (! validateDomain($content)) {
+                       if (! validateDomain($content, true)) {
                                $errors[] = $this->lng['error']['dns_cname_invaliddom'];
                        } else {
                                // check whether there are RR-records for the same resource

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.