diff --git a/.env b/.env index c175012b..557ed6e8 100644 --- a/.env +++ b/.env @@ -8,7 +8,6 @@ APP_SECRET=a03498528f5a5fc089273ec9ae5b2849 # Change this and uncomment the following line to set the trusted hosts for your Part-DB installation, aka under which # domain names it is reachable. This is makes things more secure, because it can prevent certain header attacks. # You have to escape dots in the domain name with a backslash -# IMPORTANT: In .env files (like this one), the value must be wrapped in single quotes as shown below. #TRUSTED_HOSTS='^(your-domain\.invalid)$' # You can also allow multiple domain names, e.g. for testing or development purposes, with an | between the domain names. diff --git a/.github/workflows/assets_artifact_build.yml b/.github/workflows/assets_artifact_build.yml index c92f6ec5..de493498 100644 --- a/.github/workflows/assets_artifact_build.yml +++ b/.github/workflows/assets_artifact_build.yml @@ -65,7 +65,7 @@ jobs: ${{ runner.os }}-yarn- - name: Setup node - uses: actions/setup-node@v7 + uses: actions/setup-node@v6 with: node-version: '22' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c2c9e93a..927a2a02 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -104,7 +104,7 @@ jobs: run: composer install --prefer-dist --no-progress - name: Setup node - uses: actions/setup-node@v7 + uses: actions/setup-node@v6 with: node-version: '22' diff --git a/VERSION b/VERSION index 965a689e..a1a4224d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.13.4 +2.13.3 diff --git a/docs/configuration.md b/docs/configuration.md index d6309351..6bf59529 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -265,16 +265,10 @@ See the [information providers]({% link usage/information_provider_system.md %}) should be accessible. If accessed via a hostname not matching the regex, an error page will be shown instead. By default this is empty, meaning Part-DB accepts requests for any host name, which is not recommended for production use. - For example, if Part-DB should only be reachable under `part-db.example.invalid`, set the following in your - `.env.local` file (the value must be wrapped in single quotes here): + For example, if Part-DB should only be reachable under `part-db.example.invalid`, set: ``` TRUSTED_HOSTS='^(part-db\.example\.invalid)$' ``` - If you set `TRUSTED_HOSTS` as an environment variable in your `docker-compose.yaml` instead, the value must - **not** be quoted: - ``` - TRUSTED_HOSTS=^(part-db\.example\.invalid)$ - ``` You can specify multiple host names separated by `|`, e.g. `^(localhost|part-db\.example\.invalid)$`. Part-DB displays a warning on the homepage (visible to administrators only) as long as this value is not set. * `DEMO_MODE` (env only): Set Part-DB into demo mode, which forbids users to change their passwords and settings. Used for the demo diff --git a/docs/installation/installation_docker.md b/docs/installation/installation_docker.md index 1331f2a3..0d5f8a8b 100644 --- a/docs/installation/installation_docker.md +++ b/docs/installation/installation_docker.md @@ -87,7 +87,6 @@ services: # To prevent HTTP Host header attacks, set this to a regex matching all host names Part-DB should be reachable under. # By default (unset) Part-DB accepts requests for any host name, which is not recommended for production use. - # IMPORTANT: Unlike in .env files, the value here must NOT be wrapped in quotes. # - TRUSTED_HOSTS=^(part-db\.example\.invalid)$ # If you need to install additional composer packages (e.g., for specific mailer transports), you can specify them here: @@ -102,8 +101,7 @@ services: openssl rand -hex 32 ``` 6. Uncomment and set the `TRUSTED_HOSTS` variable to a regex matching the host name(s) Part-DB should be reachable under - (e.g. `^(part-db\.example\.invalid)$`), to prevent HTTP Host header attacks. Note that, unlike in `.env` files, the - value must **not** be quoted in `docker-compose.yaml`. See [Configuration]({% link configuration.md %}) + (e.g. `^(part-db\.example\.invalid)$`), to prevent HTTP Host header attacks. See [Configuration]({% link configuration.md %}) for more information. 7. Inside the folder, run @@ -183,7 +181,6 @@ services: # To prevent HTTP Host header attacks, set this to a regex matching all host names Part-DB should be reachable under. # By default (unset) Part-DB accepts requests for any host name, which is not recommended for production use. - # IMPORTANT: Unlike in .env files, the value here must NOT be wrapped in quotes. # - TRUSTED_HOSTS=^(part-db\.example\.invalid)$ # If you need to install additional composer packages (e.g., for specific mailer transports), you can specify them here: diff --git a/docs/installation/reverse-proxy.md b/docs/installation/reverse-proxy.md index 30c74223..24d502b4 100644 --- a/docs/installation/reverse-proxy.md +++ b/docs/installation/reverse-proxy.md @@ -24,18 +24,12 @@ the reverse proxy). You should also set the `TRUSTED_HOSTS` environment variable to a regex matching the host name(s) Part-DB is reachable under via the reverse proxy, to prevent `HTTP Host header attacks`. For example, if Part-DB is reachable via -`part-db.example.invalid`, set the following in your `.env.local` file (the value must be wrapped in single quotes here): +`part-db.example.invalid`, set: ``` TRUSTED_HOSTS='^(part-db\.example\.invalid)$' ``` -If you set `TRUSTED_HOSTS` in your `docker-compose.yaml` instead, the value must **not** be quoted: - -``` -TRUSTED_HOSTS=^(part-db\.example\.invalid)$ -``` - See the [configuration options](../configuration.md) page for more information about `TRUSTED_HOSTS`. ## Part-DB in a subpath via reverse proxy diff --git a/docs/usage/import_export.md b/docs/usage/import_export.md index 9f1525c2..f4d8d91c 100644 --- a/docs/usage/import_export.md +++ b/docs/usage/import_export.md @@ -109,21 +109,6 @@ supplier is not specified, the price and supplier product number fields will be * **`supplier_product_number`** or **`supplier_part_number`** or * **`spn`**: The supplier product number of the part. * **`price`**: The price of the part in the base currency of the database (by default euro). -The following fields set the EDA / KiCad metadata of the part (see [EDA / KiCad integration](eda_integration.md)). -These can be given either as the flat column names below, or in the nested `eda_info.*` form used by the -CSV/JSON export and the [example file](#example-data) (e.g. `eda_info.kicad_symbol`), so a file exported from -Part-DB can be re-imported without renaming its headers: - -* **`eda_kicad_symbol`** or **`kicad_symbol`**: The KiCad symbol of the part, e.g. `Device:R`. -* **`eda_kicad_footprint`** or **`kicad_footprint`**: The KiCad footprint, e.g. `Resistor_SMD:R_0805_2012Metric`. -* **`eda_reference_prefix`** or **`kicad_reference`**: The schematic reference prefix, e.g. `R`, `C`, `L`. -* **`eda_value`** or **`kicad_value`**: The value shown in the EDA tool, e.g. `10k`. -* **`eda_exclude_from_bom`** (or **`eda_exclude_bom`**), **`eda_exclude_from_board`** (or **`eda_exclude_board`**), - **`eda_exclude_from_sim`** (or **`eda_exclude_sim`**): Booleans (`1`/`0`) to exclude the part from the BOM, board - or simulation. -* **`eda_visibility`**: Boolean (`1`/`0`) controlling whether the part is exposed to the EDA tool. The inverse - convenience alias **`eda_invisible`** is also accepted (so `eda_invisible=1` hides the part). - #### Example data Here you can find some example data for the import of parts, you can use it as a template for your own import ( diff --git a/public/kicad/footprints.txt b/public/kicad/footprints.txt index 538984c2..a9e0df15 100644 --- a/public/kicad/footprints.txt +++ b/public/kicad/footprints.txt @@ -1,4 +1,4 @@ -# Generated on Mon Jul 27 05:55:56 UTC 2026 +# Generated on Mon Jul 20 05:45:44 UTC 2026 # This file contains all footprints available in the offical KiCAD library Audio_Module:Reverb_BTDR-1H Audio_Module:Reverb_BTDR-1V diff --git a/public/kicad/symbols.txt b/public/kicad/symbols.txt index 2c0e2558..40f51b0e 100644 --- a/public/kicad/symbols.txt +++ b/public/kicad/symbols.txt @@ -1,4 +1,4 @@ -# Generated on Mon Jul 27 05:56:38 UTC 2026 +# Generated on Mon Jul 20 05:46:23 UTC 2026 # This file contains all symbols available in the offical KiCAD library 4xxx:14528 4xxx:14529 @@ -5358,18 +5358,6 @@ Converter_DCDC_Isolated:THN10-7215UIR Converter_DCDC_Isolated:THN10-7221UIR Converter_DCDC_Isolated:THN10-7222UIR Converter_DCDC_Isolated:THN10-7223UIR -Converter_DCDC_Isolated:THN15-3611UIR -Converter_DCDC_Isolated:THN15-3612UIR -Converter_DCDC_Isolated:THN15-3613UIR -Converter_DCDC_Isolated:THN15-3615UIR -Converter_DCDC_Isolated:THN15-3622UIR -Converter_DCDC_Isolated:THN15-3623UIR -Converter_DCDC_Isolated:THN15-7211UIR -Converter_DCDC_Isolated:THN15-7212UIR -Converter_DCDC_Isolated:THN15-7213UIR -Converter_DCDC_Isolated:THN15-7215UIR -Converter_DCDC_Isolated:THN15-7222UIR -Converter_DCDC_Isolated:THN15-7223UIR Converter_DCDC_Isolated:THR40-7211WI Converter_DCDC_Isolated:THR40-7212WI Converter_DCDC_Isolated:THR40-7213WI @@ -5508,24 +5496,6 @@ Converter_DCDC_Isolated:TMR4-4813WI Converter_DCDC_Isolated:TMR4-4815WI Converter_DCDC_Isolated:TMR4-4822WI Converter_DCDC_Isolated:TMR4-4823WI -Converter_DCDC_Isolated:TMR8-1211WI -Converter_DCDC_Isolated:TMR8-1212WI -Converter_DCDC_Isolated:TMR8-1213WI -Converter_DCDC_Isolated:TMR8-1215WI -Converter_DCDC_Isolated:TMR8-1222WI -Converter_DCDC_Isolated:TMR8-1223WI -Converter_DCDC_Isolated:TMR8-2411WI -Converter_DCDC_Isolated:TMR8-2412WI -Converter_DCDC_Isolated:TMR8-2413WI -Converter_DCDC_Isolated:TMR8-2415WI -Converter_DCDC_Isolated:TMR8-2422WI -Converter_DCDC_Isolated:TMR8-2423WI -Converter_DCDC_Isolated:TMR8-4811WI -Converter_DCDC_Isolated:TMR8-4812WI -Converter_DCDC_Isolated:TMR8-4813WI -Converter_DCDC_Isolated:TMR8-4815WI -Converter_DCDC_Isolated:TMR8-4822WI -Converter_DCDC_Isolated:TMR8-4823WI Converter_DCDC_Isolated:TMR_1-0511 Converter_DCDC_Isolated:TMR_1-0511SM Converter_DCDC_Isolated:TMR_1-0512 @@ -9696,9 +9666,7 @@ Logic_Programmable:PAL20L10xxNS Logic_Programmable:PAL20L8 Logic_Programmable:PAL20R8xx-P Logic_Programmable:PAL20RS10 -Logic_Programmable:PAL22V10-xxP Logic_Programmable:PALCE16V8 -Logic_Programmable:PALCE22V10x-xxP Logic_Programmable:PEEL22CV10AP Logic_Programmable:PEEL22CV10AS MCU_AnalogDevices:ADUC816BSZ diff --git a/src/Serializer/PartNormalizer.php b/src/Serializer/PartNormalizer.php index 50f76132..8486a634 100644 --- a/src/Serializer/PartNormalizer.php +++ b/src/Serializer/PartNormalizer.php @@ -63,9 +63,7 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Norm 'eda_exclude_bom' => 'eda_exclude_from_bom', 'eda_exclude_board' => 'eda_exclude_from_board', 'eda_exclude_sim' => 'eda_exclude_from_sim', - //NOTE: "eda_invisible" is intentionally NOT mapped here: it is the *inverse* of - //"eda_visibility", so a plain key rename would store the wrong value. It is handled - //(and inverted) explicitly in applyEdaFields(). + 'eda_invisible' => 'eda_visibility', ]; public function __construct( @@ -237,9 +235,6 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Norm } if (isset($data['eda_visibility']) && $data['eda_visibility'] !== '') { $edaInfo->setVisibility(filter_var($data['eda_visibility'], FILTER_VALIDATE_BOOLEAN)); - } elseif (isset($data['eda_invisible']) && $data['eda_invisible'] !== '') { - //"eda_invisible" is the inverse convenience alias of "eda_visibility" - $edaInfo->setVisibility(!filter_var($data['eda_invisible'], FILTER_VALIDATE_BOOLEAN)); } } diff --git a/templates/bundles/TwigBundle/Exception/error400.html.twig b/templates/bundles/TwigBundle/Exception/error400.html.twig index 2ad31626..f5ed56b9 100644 --- a/templates/bundles/TwigBundle/Exception/error400.html.twig +++ b/templates/bundles/TwigBundle/Exception/error400.html.twig @@ -23,16 +23,12 @@
Try following things:
TRUSTED_HOSTS environment variable to a regular expression matching all host names Part-DB should be reachable under. Note that the required quoting differs depending on where you set it:
- .env.local file, the value must be wrapped in single quotes: TRUSTED_HOSTS='^({{ seen_host|replace({'.': '\\.'}) }})$' (if {{ seen_host }} is a host name you trust)docker-compose.yaml, the value must NOT be quoted: TRUSTED_HOSTS=^({{ seen_host|replace({'.': '\\.'}) }})$ (if {{ seen_host }} is a host name you trust).env.local file, the value must be wrapped in single quotes: TRUSTED_HOSTS='^(localhost|example\.com)$'docker-compose.yaml, the value must NOT be quoted: TRUSTED_HOSTS=^(localhost|example\.com)$TRUSTED_HOSTS environment variable in your .env.local file (or your docker-compose environment) to a regular expression matching all host names Part-DB should be reachable under, e.g.
+ {% if seen_host %}
+ TRUSTED_HOSTS='^({{ seen_host|replace({'.': '\\.'}) }})$' (if {{ seen_host }} is a host name you trust)
+ {% else %}
+ TRUSTED_HOSTS='^(localhost|example\.com)$'
+ {% endif %}
TRUSTED_PROXIES is configured correctly, so the original host name is forwarded properly.{% trans %}system.trusted_hosts.unconfigured.message{% endtrans %} - {% trans %}system.trusted_hosts.unconfigured.suggestion{% endtrans %}
-{% trans %}system.trusted_hosts.unconfigured.env_example{% endtrans %}
- TRUSTED_HOSTS='^({{ app.request.host|replace({'.': '\\.'}) }})$'
{% trans %}system.trusted_hosts.unconfigured.docker_example{% endtrans %}
- TRUSTED_HOSTS=^({{ app.request.host|replace({'.': '\\.'}) }})$
{% trans %}system.trusted_hosts.unconfigured.message{% endtrans %}
+{% trans %}system.trusted_hosts.unconfigured.suggestion{% endtrans %}
+ TRUSTED_HOSTS='^({{ app.request.host|replace({'.': '\\.'}) }})$'