diff --git a/.env b/.env index 557ed6e8..c175012b 100644 --- a/.env +++ b/.env @@ -8,6 +8,7 @@ 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 de493498..c92f6ec5 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@v6 + uses: actions/setup-node@v7 with: node-version: '22' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 927a2a02..c2c9e93a 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@v6 + uses: actions/setup-node@v7 with: node-version: '22' diff --git a/VERSION b/VERSION index a1a4224d..965a689e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.13.3 +2.13.4 diff --git a/docs/configuration.md b/docs/configuration.md index 6bf59529..d6309351 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -265,10 +265,16 @@ 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: + 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): ``` 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 0d5f8a8b..1331f2a3 100644 --- a/docs/installation/installation_docker.md +++ b/docs/installation/installation_docker.md @@ -87,6 +87,7 @@ 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: @@ -101,7 +102,8 @@ 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. See [Configuration]({% link configuration.md %}) + (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 %}) for more information. 7. Inside the folder, run @@ -181,6 +183,7 @@ 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 24d502b4..30c74223 100644 --- a/docs/installation/reverse-proxy.md +++ b/docs/installation/reverse-proxy.md @@ -24,12 +24,18 @@ 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: +`part-db.example.invalid`, set the following in your `.env.local` file (the value must be wrapped in single quotes here): ``` 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 f4d8d91c..9f1525c2 100644 --- a/docs/usage/import_export.md +++ b/docs/usage/import_export.md @@ -109,6 +109,21 @@ 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 a9e0df15..538984c2 100644 --- a/public/kicad/footprints.txt +++ b/public/kicad/footprints.txt @@ -1,4 +1,4 @@ -# Generated on Mon Jul 20 05:45:44 UTC 2026 +# Generated on Mon Jul 27 05:55:56 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 40f51b0e..2c0e2558 100644 --- a/public/kicad/symbols.txt +++ b/public/kicad/symbols.txt @@ -1,4 +1,4 @@ -# Generated on Mon Jul 20 05:46:23 UTC 2026 +# Generated on Mon Jul 27 05:56:38 UTC 2026 # This file contains all symbols available in the offical KiCAD library 4xxx:14528 4xxx:14529 @@ -5358,6 +5358,18 @@ 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 @@ -5496,6 +5508,24 @@ 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 @@ -9666,7 +9696,9 @@ 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 8486a634..50f76132 100644 --- a/src/Serializer/PartNormalizer.php +++ b/src/Serializer/PartNormalizer.php @@ -63,7 +63,9 @@ 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', - 'eda_invisible' => 'eda_visibility', + //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(). ]; public function __construct( @@ -235,6 +237,9 @@ 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 f5ed56b9..2ad31626 100644 --- a/templates/bundles/TwigBundle/Exception/error400.html.twig +++ b/templates/bundles/TwigBundle/Exception/error400.html.twig @@ -23,12 +23,16 @@

Try following things: