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

[Bug]: FileScan crash -> Exif Tool parser broken #46150

Open
5 of 8 tasks
xkill opened this issue Jun 26, 2024 · 0 comments
Open
5 of 8 tasks

[Bug]: FileScan crash -> Exif Tool parser broken #46150

xkill opened this issue Jun 26, 2024 · 0 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug

Comments

@xkill
Copy link

xkill commented Jun 26, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

Filescan crashes when enabled --generate-metadata (exif parser failed):

ypeError: OCA\Photos\Listener\ExifMetadataProvider::parseGPSData(): Argument #1 ($rawData) must be of type string, array given, called in /srv/http/nextcloud/apps/photos/lib/Listener/ExifMetadataProvider.php on line 113 and defined in /srv/http/nextcloud/apps/photos/lib/Listener/ExifMetadataProvider.php:140
Stack trace:
#0 /srv/http/nextcloud/apps/photos/lib/Listener/ExifMetadataProvider.php(113): OCA\Photos\Listener\ExifMetadataProvider->parseGPSData()
#1 /srv/http/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php(86): OCA\Photos\Listener\ExifMetadataProvider->handle()
#2 /srv/http/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(230): OC\EventDispatcher\ServiceEventListener->__invoke()
#3 /srv/http/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
#4 /srv/http/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(86): Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
#5 /srv/http/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(98): OC\EventDispatcher\EventDispatcher->dispatch()
#6 /srv/http/nextcloud/lib/private/FilesMetadata/FilesMetadataManager.php(114): OC\EventDispatcher\EventDispatcher->dispatchTyped()
#7 /srv/http/nextcloud/apps/files/lib/Command/Scan.php(143): OC\FilesMetadata\FilesMetadataManager->refreshMetadata()
#8 [internal function]: OCA\Files\Command\Scan->OCA\Files\Command\{closure}()
#9 /srv/http/nextcloud/lib/private/Hooks/EmitterTrait.php(105): call_user_func_array()
#10 /srv/http/nextcloud/lib/private/Hooks/PublicEmitter.php(40): OC\Hooks\BasicEmitter->emit()
#11 /srv/http/nextcloud/lib/private/Files/Utils/Scanner.php(134): OC\Hooks\PublicEmitter->emit()
#12 [internal function]: OC\Files\Utils\Scanner->OC\Files\Utils\{closure}()
#13 /srv/http/nextcloud/lib/private/Hooks/EmitterTrait.php(105): call_user_func_array()
#14 /srv/http/nextcloud/lib/private/Files/Cache/Scanner.php(173): OC\Hooks\BasicEmitter->emit()
#15 /srv/http/nextcloud/lib/private/Files/Cache/Scanner.php(525): OC\Files\Cache\Scanner->scanFile()
#16 /srv/http/nextcloud/lib/private/Files/Cache/Scanner.php(449): OC\Files\Cache\Scanner->handleChildren()
#17 /srv/http/nextcloud/lib/private/Files/Cache/Scanner.php(454): OC\Files\Cache\Scanner->scanChildren()
#18 /srv/http/nextcloud/lib/private/Files/Cache/Scanner.php(454): OC\Files\Cache\Scanner->scanChildren()
#19 /srv/http/nextcloud/lib/private/Files/Cache/Scanner.php(454): OC\Files\Cache\Scanner->scanChildren()
#20 /srv/http/nextcloud/lib/private/Files/Cache/Scanner.php(355): OC\Files\Cache\Scanner->scanChildren()
#21 /srv/http/nextcloud/lib/private/Files/Utils/Scanner.php(278): OC\Files\Cache\Scanner->scan()
#22 /srv/http/nextcloud/apps/files/lib/Command/Scan.php(180): OC\Files\Utils\Scanner->scan()
#23 /srv/http/nextcloud/apps/files/lib/Command/Scan.php(241): OCA\Files\Command\Scan->scanFiles()
#24 /srv/http/nextcloud/3rdparty/symfony/console/Command/Command.php(298): OCA\Files\Command\Scan->execute()
#25 /srv/http/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#26 /srv/http/nextcloud/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#27 /srv/http/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#28 /srv/http/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#29 /srv/http/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()
#30 /srv/http/nextcloud/console.php(102): OC\Console\Application->run()
#31 /srv/http/nextcloud/occ(11): require_once('...')

The exif metadata of the file that was tried to analyse:

ExifTool Version Number         : 12.40
File Name                       : CAM00080.jpg
Directory                       : user/files/Fotos/Fotos imprimir
File Size                       : 602 KiB
File Modification Date/Time     : 2013:09:20 13:55:00+00:00
File Access Date/Time           : 2024:06:26 12:21:50+00:00
File Inode Change Date/Time     : 2024:02:14 23:41:31+00:00
File Permissions                : -rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Y Cb Cr Positioning             : Centered
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Make                            : LG Electronics
Camera Model Name               : LG-E975
Exif Version                    : 0220
Components Configuration        : -, Cr, Cb, Y
Flashpix Version                : 0010
Color Space                     : sRGB
Exif Image Width                : 960
Exif Image Height               : 1280
Date/Time Original              : 2013:09:20 14:55:39
Create Date                     : 2013:09:20 14:55:39
Focal Length                    : 4.6 mm
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0010
GPS Version ID                  : 0.0.32.32
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 14:55:34
GPS Map Datum                   : WGS-84
Compression                     : JPEG (old-style)
Thumbnail Offset                : 676
Thumbnail Length                : 2306
JFIF Version                    : 1.01
Image Width                     : 960
Image Height                    : 1280
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 960x1280
Megapixels                      : 1.2
Thumbnail Image                 : (Binary data 2306 bytes, use -b option to extract)
GPS Latitude                    : 40 deg 28' 45.00" N
GPS Longitude                   : 4367743127 deg 1' 24.00" W
Focal Length                    : 4.6 mm
GPS Position                    : 40 deg 28' 45.00" N, 4367743127 deg 1' 24.00" W

When the exception happens, the filescan is stopped

Steps to reproduce

see the bug description.

Expected behavior

Even if exif parser is not able to parse any specific details, it should through an error but, at least, continue with the scan.

Installation method

Community Manual installation with Archive

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "dbtableprefix": "oc_",
        "version": "29.0.2.2",
        "installed": true,
        "theme": "",
        "maintenance": false,
        "maintenance_window_start": 1,
        "default_language": "es",
        "default_locale": "es_ES",
        "loglevel": "0",
        "log_type": "file",
        "logfile": "\/srv\/http\/xxx.com\/nextcloud-logs\/nextcloud.log",
        "share_folder": "\/Shared",
        "allow_local_remote_servers": true,
        "forcessl": true,
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "timeout": 1.5
        },
        "trashbin_retention_obligation": "auto",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbdriveroptions": {
            "1003": 1
        },
        "mysql.utf8mb4": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "overwrite.cli.url": "https:\/\/xxx.com",
        "data-fingerprint": "7cc848b866dee7214314504128a1f9d2",
        "trusted_domains": [
            "xxx.com"
        ],
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\Movie",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\SVG",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\Font",
            "OC\\Preview\\Image",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\MTS",
            "OC\\Preview\\AVI"
        ],
        "has_rebuilt_cache": true,
        "preview_max_x": 4096,
        "preview_max_y": 4096,
        "jpeg_quality": 60,
        "preview_max_memory": "4096",
        "preview_max_filesize_image": "256",
        "preview": {
            "jpeg_quality": "60"
        },
        "encryption.legacy_format_support": false,
        "encryption.key_storage_migrated": false,
        "default_phone_region": "ES",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "app_install_overwrite": [
            "previewgenerator",
            "socialsharing_email",
            "epubreader",
            "video_converter",
            "facerecognition",
            "memories",
            "workflow_media_converter",
            "extract",
            "sharelisting",
            "twofactor_email",
            "secrets"
        ],
        "memories.ffmpeg_path": "\/usr\/bin\/ffmpeg",
        "memories.ffprobe_path": "\/usr\/bin\/ffprobe",
        "memories.transcoder": "\/srv\/http\/xxx.com\/nextcloud\/apps\/memories\/exiftool-bin\/go-vod-amd64",
        "memories.no_transcode": false,
        "memories.qsv": false,
        "memories.vod.path": "\/srv\/http\/xxx.com\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "preview_max_scale_factor": "1",
        "memories.gis_type": 1,
        "memories.db.triggers.fcu": true,
        "memories.vod.qf": 20,
        "memories.exiftool": "\/srv\/http\/xxx.com\/nextcloud\/apps\/memories\/bin-ext\/exiftool-amd64-glibc"
    }
}

List of activated Apps

Enabled:
  - activity: 2.21.1
  - admin_audit: 1.19.0
  - bruteforcesettings: 2.9.0
  - calendar: 4.7.6
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0
  - contactsinteraction: 1.10.0
  - dav: 1.30.1
  - facerecognition: 0.9.51
  - federatedfilesharing: 1.19.0
  - files: 2.1.0
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_retention: 1.18.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - integration_giphy: 1.0.10
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - maps: 1.4.0
  - memories: 7.3.1
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - photos: 2.5.0
  - previewgenerator: 5.5.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - quota_warning: 1.19.0
  - recognize: 7.0.0
  - related_resources: 1.4.0
  - richdocuments: 8.4.3
  - richdocumentscode: 24.4.201
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - sharelisting: 1.2.0
  - socialsharing_email: 3.1.0
  - spreed: 19.0.3
  - tasks: 0.16.0
  - text: 3.10.0
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_nextcloud_notification: 3.9.0
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1
  - user_ldap: 1.20.0
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflow_media_converter: 1.11.7
  - workflowengine: 2.11.0
Disabled:
  - admin_notifications: 1.0.2 (installed 1.0.2)
  - announcementcenter: 6.8.1 (installed 6.8.1)
  - backup: 1.4.0 (installed 1.4.0)
  - camerarawpreviews: 0.8.5 (installed 0.8.5)
  - checksum: 1.2.4 (installed 1.2.4)
  - dashboard: 7.9.0 (installed 7.1.0)
  - drawio: 3.0.2 (installed 3.0.2)
  - duplicatefinder: 1.1.10 (installed 1.1.10)
  - encryption: 2.17.0 (installed 1.3.0)
  - extract: 1.3.6 (installed 1.3.6)
  - federation: 1.19.0 (installed 1.11.0)
  - files_clipboard: 0.7.1 (installed 0.7.1)
  - files_downloadactivity: 1.16.0 (installed 1.16.0)
  - files_fulltextsearch: 29.0.0 (installed 29.0.0)
  - files_markdown: 2.4.1 (installed 2.4.1)
  - forms: 4.2.4 (installed 4.2.4)
  - fulltextsearch: 29.0.0 (installed 29.0.0)
  - impersonate: 1.16.0 (installed 1.16.0)
  - keeweb: 0.6.18 (installed 0.6.18)
  - mail: 3.7.1 (installed 3.7.1)
  - metadata: 0.20.0 (installed 0.20.0)
  - nextcloud_announcements: 1.18.0 (installed 1.13.0)
  - polls: 7.1.1 (installed 7.1.1)
  - ransomware_protection: 1.14.0 (installed 1.14.0)
  - recommendations: 2.1.0 (installed 1.0.0)
  - serverinfo: 1.19.0 (installed 1.11.0)
  - support: 1.12.0 (installed 1.0.0)
  - survey_client: 1.17.0 (installed 1.15.0)
  - suspicious_login: 7.0.0 (installed 5.0.0)
  - systemtags: 1.19.0 (installed 1.11.0)
  - twofactor_email: 2.7.4 (installed 2.7.4)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

@xkill xkill added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug
Projects
None yet
Development

No branches or pull requests

2 participants