Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Skip empty files in metadata providers #2166

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Dec 4, 2023

Avoid errors in the log when being called with an empty file:

{
  "reqId": "vjssIBquwyINBtapTLW9",
  "level": 3,
  "time": "2023-12-04T07:45:18+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "PHP",
  "method": "",
  "url": "--",
  "message": "exif_read_data(): File too small (0) at /var/www/html/apps-extra/photos/lib/Listener/ExifMetadataProvider.php#75",
  "userAgent": "--",
  "version": "29.0.0.2",
  "data": {
    "app": "PHP"
  }
}
{
  "reqId": "vjssIBquwyINBtapTLW9",
  "level": 3,
  "time": "2023-12-04T07:45:18+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "PHP",
  "method": "",
  "url": "--",
  "message": "getimagesizefromstring(): Error reading from ! at /var/www/html/apps-extra/photos/lib/Listener/SizeMetadataProvider.php#56",
  "userAgent": "--",
  "version": "29.0.0.2",
  "data": {
    "app": "PHP"
  }
}

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr requested review from artonge, a team, ArtificialOwl and icewind1991 and removed request for a team December 4, 2023 07:43
@juliusknorr
Copy link
Member Author

These cypress tests also fails on other PRs

@juliusknorr juliusknorr merged commit aa82646 into master Dec 4, 2023
26 of 29 checks passed
@juliusknorr juliusknorr deleted the bugfix/skip-empty-files branch December 4, 2023 09:49
@juliusknorr juliusknorr added bug Something isn't working 3. to review Waiting for reviews labels Dec 4, 2023
@juliusknorr
Copy link
Member Author

/backport to stable28

@backportbot-nextcloud backportbot-nextcloud bot added the backport-request Pending backport by the backport-bot label Dec 4, 2023
@juliusknorr juliusknorr added this to the Nextcloud 29 milestone Dec 4, 2023
@backportbot-nextcloud backportbot-nextcloud bot removed the backport-request Pending backport by the backport-bot label Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants