Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F118304821
D44.1775746568.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
D44.1775746568.diff
View Options
diff --git a/docs/README b/docs/README
--- a/docs/README
+++ b/docs/README
@@ -23,12 +23,12 @@
1. Apache
# for https://domain.tld (and https://autodiscover.domain.tld)
-Alias /autodiscover/autodiscover.xml /usr/share/kolab-autodiscover/public_html
-Alias /Autodiscover/Autodiscover.xml /usr/share/kolab-autodiscover/public_html
-Alias /AutoDiscover/AutoDiscover.xml /usr/share/kolab-autodiscover/public_html
+Alias /autodiscover/autodiscover.xml /usr/share/kolab-autodiscover/public_html/index.php
+Alias /Autodiscover/Autodiscover.xml /usr/share/kolab-autodiscover/public_html/index.php
+Alias /AutoDiscover/AutoDiscover.xml /usr/share/kolab-autodiscover/public_html/index.php
# for http://autoconfig.domain.tld
-Alias /mail/config-v1.1.xml /usr/share/kolab-autodiscover/public_html
+Alias /mail/config-v1.1.xml /usr/share/kolab-autodiscover/public_html/index.php
# for http://domain.tld
-Alias /.well-known/autoconfig/mail/config-v1.1.xml /usr/share/kolab-autodiscover/public_html
+Alias /.well-known/autoconfig/mail/config-v1.1.xml /usr/share/kolab-autodiscover/public_html/index.php
2. Add [autodiscover] section in /etc/kolab/kolab.conf (see sample kolab.conf.sample)
diff --git a/docs/kolab-autoconf.conf b/docs/kolab-autoconf.conf
--- a/docs/kolab-autoconf.conf
+++ b/docs/kolab-autoconf.conf
@@ -1,11 +1,19 @@
+# Force all requests to lowercase. Different MUAs, mobile devices etc
+# request the Autodiscover URL in different cases.
+RewriteEngine On
+RewriteMap lc int:tolower
+RewriteCond %{REQUEST_URI} !^/Microsoft
+RewriteCond %{REQUEST_URI} [A-Z]
+RewriteRule (.*) ${lc:$1} [R=301,L]
+
# for https://domain.tld (and https://autodiscover.domain.tld)
-Alias /autodiscover/autodiscover.xml /usr/share/kolab-autoconf/public_html
-Alias /Autodiscover/Autodiscover.xml /usr/share/kolab-autoconf/public_html
-Alias /AutoDiscover/AutoDiscover.xml /usr/share/kolab-autoconf/public_html
+Alias /autodiscover/autodiscover.xml /usr/share/kolab-autoconf/public_html/index.php
+
# for http://autoconfig.domain.tld
-Alias /mail/config-v1.1.xml /usr/share/kolab-autoconf/public_html
+Alias /mail/config-v1.1.xml /usr/share/kolab-autoconf/public_html/index.php
+
# for http://domain.tld
-Alias /.well-known/autoconfig/mail/config-v1.1.xml /usr/share/kolab-autoconf/public_html
+Alias /.well-known/autoconfig/mail/config-v1.1.xml /usr/share/kolab-autoconf/public_html/index.php
<Directory "/usr/share/kolab-autoconf/public_html">
AllowOverride None
diff --git a/lib/AutodiscoverMicrosoft.php b/lib/AutodiscoverMicrosoft.php
--- a/lib/AutodiscoverMicrosoft.php
+++ b/lib/AutodiscoverMicrosoft.php
@@ -52,12 +52,22 @@
// parse XML
try {
$xml = new SimpleXMLElement($post);
+ Log::debug(print_r($xml, true));
- if ($email = $xml->xpath('/Autodiscover/Request/EMailAddress')) {
+ foreach($xml->getDocNamespaces() as $strPrefix => $strNamespace) {
+ if(strlen($strPrefix)==0) {
+ $strPrefix="a"; //Assign an arbitrary namespace prefix.
+ }
+ $xml->registerXPathNamespace($strPrefix,$strNamespace);
+ }
+
+
+
+ if ($email = $xml->xpath('//a:EMailAddress')) {
$this->email = (string) array_shift($email);
}
- if ($schema = $xml->xpath('/Autodiscover/Request/AcceptableResponseSchema')) {
+ if ($schema = $xml->xpath('//a:AcceptableResponseSchema')) {
$schema = (string) array_shift($schema);
if (strpos($schema, 'mobilesync')) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 9, 2:56 PM (2 d, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18850972
Default Alt Text
D44.1775746568.diff (3 KB)
Attached To
Mode
D44: include Outlook 2010 XML Namespace in XML parser
Attached
Detach File
Event Timeline