Merge pull request #1527 from Alfresco/fix/MNT-23234_solr_backup_dir

Prepend core name to Solr backup dir
This commit is contained in:
Andrea Gazzarini
2022-10-05 12:48:05 +02:00
committed by GitHub
5 changed files with 48 additions and 23 deletions
@@ -1160,27 +1160,40 @@
https://wiki.apache.org/solr/SolrCloud/
-->
<requestHandler name="/replication" class="org.alfresco.solr.handler.AlfrescoReplicationHandler">
<!--
To enable simple master/slave replication, uncomment one of the
sections below, depending on whether this solr instance should be
the "master" or a "slave". If this instance is a "slave" you will
also need to fill in the masterUrl to point to a real machine.
-->
<!--
<lst name="master">
<str name="replicateAfter">commit</str>
<str name="replicateAfter">startup</str>
<str name="confFiles">schema.xml,stopwords.txt</str>
</lst>
-->
<!--
<lst name="slave">
<str name="masterUrl">http://your-master-hostname:8983/solr/alfresco</str>
<str name="pollInterval">00:00:60</str>
</lst>
-->
</requestHandler>
<requestHandler name="/replication" class="solr.ReplicationHandler">
<!--
To enable simple master/slave replication, uncomment one of the
sections below, depending on whether this solr instance should be
the "master" or a "slave". If this instance is a "slave" you will
also need to fill in the masterUrl to point to a real machine.
-->
<!--
<lst name="master">
<str name="replicateAfter">commit</str>
<str name="replicateAfter">startup</str>
<str name="confFiles">schema.xml,stopwords.txt</str>
</lst>
-->
<!--
<lst name="slave">
<str name="masterUrl">http://your-master-hostname:8983/solr/alfresco</str>
<str name="pollInterval">00:00:60</str>
</lst>
-->
<!--
This invariant is needed to prevent the usage of location parameter in the replication handler APIs.
There is no validation for location parameter. This results in a vulnerability described in https://nvd.nist.gov/vuln/detail/CVE-2020-13941
If the solr.backup.dir property is not specified, it is set to the Solrs data directory.
-->
<lst name="invariants">
<str name="location">${solr.backup.dir:.}/${solr.core.name}</str>
</lst>
</requestHandler>
<!-- Search Components
@@ -1180,9 +1180,11 @@
<!--
This invariant is needed to prevent the usage of location parameter in the replication handler APIs.
There is no validation for location parameter. This results in a vulnerability described in https://nvd.nist.gov/vuln/detail/CVE-2020-13941
If the solr.backup.dir property is not specified, it is set to the Solrs data directory.
-->
<lst name="invariants">
<str name="location">${solr.backup.dir:.}</str>
<str name="location">${solr.backup.dir:.}/${solr.core.name}</str>
</lst>
</requestHandler>
@@ -188,7 +188,11 @@
<queryResponseWriter name="xml" default="true"
class="solr.XMLResponseWriter" />
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" >
<lst name="invariants">
<str name="location">${solr.backup.dir:.}/${solr.core.name}</str>
</lst>
</requestHandler>
<!-- An alternate set representation that uses an integer hash to store filters (sets of docids).
If the set cardinality <= maxSize elements, then HashDocSet will be used instead of the bitset
@@ -193,6 +193,9 @@
<str name="replicateAfter">commit</str>
<str name="confFiles">schema.xml</str>
</lst>
<lst name="invariants">
<str name="location">${solr.backup.dir:.}/${solr.core.name}</str>
</lst>
</requestHandler>
@@ -197,6 +197,9 @@
<str name="masterUrl">{masterURL}</str>
<str name="pollInterval">00:00:02</str>
</lst>
<lst name="invariants">
<str name="location">${solr.backup.dir:.}/${solr.core.name}</str>
</lst>
</requestHandler>
<!-- An alternate set representation that uses an integer hash to store filters (sets of docids).