This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new 3104c3d Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=43548
3104c3d is described below
commit 3104c3d2b7b4c8191734241140992babe9f7e920
Author: Mark Thomas <[email protected]>
AuthorDate: Thu May 23 22:07:49 2019 +0100
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=43548
Add an XML schema for the tomcat-users.xml file.
---
conf/tomcat-users.xml | 7 +++--
conf/tomcat-users.xsd | 59 ++++++++++++++++++++++++++++++++++++++
res/confinstall/tomcat-users_1.xml | 5 +++-
webapps/docs/changelog.xml | 4 +++
4 files changed, 72 insertions(+), 3 deletions(-)
diff --git a/conf/tomcat-users.xml b/conf/tomcat-users.xml
index 1df2648..aef66d0 100644
--- a/conf/tomcat-users.xml
+++ b/conf/tomcat-users.xml
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='utf-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,7 +15,10 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<tomcat-users>
+<tomcat-users xmlns="http://tomcat.apache.org/xml"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://tomcat.apache.org/xml
tomcat-users.xsd"
+ version="1.0">
<!--
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
diff --git a/conf/tomcat-users.xsd b/conf/tomcat-users.xsd
new file mode 100644
index 0000000..948bd01
--- /dev/null
+++ b/conf/tomcat-users.xsd
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://tomcat.apache.org/xml"
+ xmlns:users="http://tomcat.apache.org/xml"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+ <xs:element name="tomcat-users">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="role" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="rolename" use="required"
type="users:entityname" />
+ <xs:attribute name="description" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="group" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="groupname" use="required"
type="users:entityname" />
+ <xs:attribute name="description" type="xs:string" />
+ <xs:attribute name="roles" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="user" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="username" use="required"
type="users:entityname" />
+ <xs:attribute name="fullname" type="xs:string" />
+ <xs:attribute name="password" type="xs:string" />
+ <xs:attribute name="roles" type="xs:string" />
+ <xs:attribute name="groups" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="version" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ <xs:simpleType name="entityname">
+ <xs:restriction base="xs:string">
+ <xs:minLength value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+</xs:schema>
\ No newline at end of file
diff --git a/res/confinstall/tomcat-users_1.xml
b/res/confinstall/tomcat-users_1.xml
index cde187d..6c2b669 100644
--- a/res/confinstall/tomcat-users_1.xml
+++ b/res/confinstall/tomcat-users_1.xml
@@ -14,4 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<tomcat-users>
+<tomcat-users xmlns="http://tomcat.apache.org/xml"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://tomcat.apache.org/xml
tomcat-users.xsd"
+ version="1.0">
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 07e9038..5791513 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -94,6 +94,10 @@
defined in <code>server.xml</code> with a <code>docBase</code> but not
the optional <code>path</code>. (markt)
</fix>
+ <add>
+ <bug>43548</bug>: Add an XML schema for the tomcat-users.xml file.
+ (markt)
+ </add>
<fix>
<bug>63324</bug>: Refactor the <code>CrawlerSessionManagerValve</code>
so that the object placed in the session is compatible with session
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]