Skip to content

Commit

Permalink
Merge branch 'openfoodfacts:main' into github-throwaway_update-donati…
Browse files Browse the repository at this point in the history
…on-to-2025
  • Loading branch information
github-throwaway authored Jan 25, 2025
2 parents 82e007c + 9141b72 commit 2e93ea2
Show file tree
Hide file tree
Showing 31 changed files with 1,824 additions and 1,145 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-per-language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Matrix
uses: crowdin/[email protected].0
uses: crowdin/[email protected].1
with:
upload_translations: false # default is false
download_translations: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: crowdin action
uses: crowdin/[email protected].0
uses: crowdin/[email protected].1
with:
upload_translations: false # default is false
# Use this option to upload translations for a single specified language
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tests/integration/outputs/


# Local files
.DS_Store?
.DS_Store
._*
.Spotlight-V100
.Trashes
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## [2.56.0](https://github.com/openfoodfacts/openfoodfacts-server/compare/v2.55.0...v2.56.0) (2025-01-22)


### Features

* add common categories found on re-commerce websites ([#11263](https://github.com/openfoodfacts/openfoodfacts-server/issues/11263)) ([8f54f80](https://github.com/openfoodfacts/openfoodfacts-server/commit/8f54f808ce708f619259ae2d4028d38c713e8041))
* Add common cosmetic allegations ([#11264](https://github.com/openfoodfacts/openfoodfacts-server/issues/11264)) ([94de6d0](https://github.com/openfoodfacts/openfoodfacts-server/commit/94de6d0ffcd697b58634f97259ea7406094e4aca))
* add link on pro platform to see nutriscore evolution [#11246](https://github.com/openfoodfacts/openfoodfacts-server/issues/11246) ([#11247](https://github.com/openfoodfacts/openfoodfacts-server/issues/11247)) ([c0518c1](https://github.com/openfoodfacts/openfoodfacts-server/commit/c0518c16562ca4b1ee92b458effed749fe3b654d))
* new import_images.pl script for pro platform ([#11225](https://github.com/openfoodfacts/openfoodfacts-server/issues/11225)) ([a46c967](https://github.com/openfoodfacts/openfoodfacts-server/commit/a46c96732b6b1accc7e491100ef3720c4808b799))
* Update the tagline to force the app upgrade ([#11262](https://github.com/openfoodfacts/openfoodfacts-server/issues/11262)) ([f685cb0](https://github.com/openfoodfacts/openfoodfacts-server/commit/f685cb019e67b0dabc049cb2a405ef0461cda0e3))


### Bug Fixes

* Add more german stopwords ([#11266](https://github.com/openfoodfacts/openfoodfacts-server/issues/11266)) ([4e45a34](https://github.com/openfoodfacts/openfoodfacts-server/commit/4e45a34d4cacae39d13deca68bff72c1035a05d7))
* link of nutri-score knowledge panel on pro platform ([#11272](https://github.com/openfoodfacts/openfoodfacts-server/issues/11272)) ([75a873b](https://github.com/openfoodfacts/openfoodfacts-server/commit/75a873b53acbe8c9bd1de3ebdbcfed9c5fa1a115))

## [2.55.0](https://github.com/openfoodfacts/openfoodfacts-server/compare/v2.54.0...v2.55.0) (2025-01-17)


Expand Down
2 changes: 1 addition & 1 deletion cgi/product_image_move.pl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
exit(0);
}

my $product_ref = product_exists($product_id); # returns 0 if not
my $product_ref = retrieve_product($product_id);

if (not $product_ref) {
$log->warn("product does not exist", {code => $code, product_id => $product_id});
Expand Down
2 changes: 1 addition & 1 deletion cgi/product_image_upload.pl
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
exit(0);
}

my $product_ref = product_exists($product_id); # returns 0 if not
my $product_ref = retrieve_product($product_id);

if (not $product_ref) {
$log->info("product code does not exist yet, creating product", {code => $code});
Expand Down
2 changes: 1 addition & 1 deletion cgi/product_multilingual.pl
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ ($product_ref)
$product_id = product_id_for_owner($Owner_id, $code);
$log->debug("we have a code", {code => $code, product_id => $product_id}) if $log->is_debug();

$product_ref = product_exists($product_id); # returns 0 if not
$product_ref = retrieve_product($product_id);

if ($product_ref) {
$log->info("product exists, redirecting to page", {code => $code}) if $log->is_info();
Expand Down
4 changes: 2 additions & 2 deletions cgi/search.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use ProductOpener::Display qw/:all/;
use ProductOpener::HTTP qw/write_cors_headers/;
use ProductOpener::Users qw/$Owner_id/;
use ProductOpener::Products qw/normalize_code normalize_search_terms product_exists product_id_for_owner product_url/;
use ProductOpener::Products qw/normalize_code normalize_search_terms retrieve_product product_id_for_owner product_url/;
use ProductOpener::Food qw/%nutriments_lists/;
use ProductOpener::Tags qw/:all/;
use ProductOpener::PackagerCodes qw/normalize_packager_codes/;
Expand Down Expand Up @@ -166,7 +166,7 @@
if ((defined $code) and (length($code) > 0)) {
my $product_id = product_id_for_owner($Owner_id, $code);

my $product_ref = product_exists($product_id); # returns 0 if not
my $product_ref = retrieve_product($product_id);

if ($product_ref) {
$log->info("product code exists, redirecting to product page", {code => $code});
Expand Down
3 changes: 2 additions & 1 deletion conf/nginx/conf.d/log_format_realip.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# a log format for behing a proxy
# also adding time the request took
log_format proxied_requests
'$http_x_forwarded_for - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
'"$http_referer" "$http_user_agent" $request_time';

4 changes: 3 additions & 1 deletion conf/nginx/sites-available/off
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ map $uri $apache_port {
# product API read / write
"~*^/api/v./product/" 8002;
# whitelist most cgi (but display and search)
"~*^/cgi/(?!display|search).pl" 8002;
"~*^/cgi/(?!display\.pl|search\.pl)" 8002;
# whitelist most api (but search)
"~*^/api/v./(?!search\b)" 8002;
}

# variables definitions for expiry headers are loaded from /etc/nginx/conf.d/expires-no-json-xml.conf
Expand Down
Loading

0 comments on commit 2e93ea2

Please sign in to comment.