Respect the submission guidelines above! Drupal.org issue forks cause additional work for the project maintainer!

Setup

  • Solr version: 8.8.0
  • Drupal Core version: 9.4
  • Search API version: 1.25
  • Search API Solr version: 4.2.8
  • Configured Solr Connector: solr_cloud

Issue

The following error occurs when clicking upload in the upload config set:
"Trying to make an unstrusted ConfigSet update on a trusted configSet"

steps to reproduce:
- enable a solr_cloud connector
- go to /admin/config/search/search-api/server/{core}/solr-admin/upload-configset
- click upload

Note that the form only shows a submit button.

We should document this requirement Upload a Configset:

Upload a configset, which is sent as a zipped file. A single, non-zipped file can also be uploaded with the filePath parameter.

This functionality is enabled by default, but can be disabled via a runtime parameter -Dconfigset.upload.enabled=false. Disabling this feature is advisable if you want to expose Solr installation to untrusted users (even though you should never do that!).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mpp created an issue. See original summary.

mpp’s picture

Issue summary: View changes
mkalkbrenner’s picture

Version: 8.x-3.9 » 4.x-dev

That error message occurs if the basic authentication fails.
Did you configure basic authentication?
If not the issue is that uploading is offered at all. It should only be available in a trusted context.

mkalkbrenner’s picture

Category: Support request » Bug report
Status: Active » Needs review
FileSize
3.18 KB
vlad.dancer’s picture

Status: Needs review » Needs work

After applying the patch and clearing cache we got:

drush cr
[warning] class_implements(): Class Drupal\search_api_solr_admin\Access\SolrAdminTrustedContextSupportedAccessCheck does not exist and could not be loaded RegisterAccessChecksPass.php:43
[warning] in_array() expects parameter 2 to be array, bool given RegisterAccessChecksPass.php:43
[04-Nov-2022 21:02:35 UTC] PHP Fatal error: Uncaught Error: Class 'Drupal\search_api_solr_admin\Access\SolrAdminTrustedContextSupportedAccessCheck' not found in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php:262

I cant find SolrAdminTrustedContextSupportedAccessCheck class neither in patch nor in latest 4.x dev.

mkalkbrenner’s picture

There were massive git issues on drupal.org over the last two days.
I will upload a new patch.

mkalkbrenner’s picture

Status: Needs work » Needs review
FileSize
4.67 KB

  • mkalkbrenner committed c661f62 on 4.x
    Issue #3316055 by mkalkbrenner, vlad.dancer: Trying to make an...
mkalkbrenner’s picture

Status: Needs review » Fixed
mkalkbrenner’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.