marius-wieschollek / passwords

A simple, yet feature rich password manager for Nextcloud
GNU Affero General Public License v3.0
201 stars 39 forks source link

[BUG]: Division by zero errors #661

Open stweil opened 2 weeks ago

stweil commented 2 weeks ago

⚠️ This issue respects the following points: ⚠️

Server Information

{
    "version": {
        "server": "29.0.2.2",
        "app": "2024.5.20",
        "lsr": false,
        "php": "8.2.18",
        "cronPhp": "8.2.20"
    },
    "environment": {
        "os": "Linux",
        "architecture": "x86_64",
        "bits": 64,
        "database": "mysql",
        "cron": "cron",
        "proxy": false,
        "sslProxy": true,
        "subdirectory": false
    },
    "services": {
        "images": "imagick",
        "favicons": "default",
        "previews": "default",
        "security": "hibp",
        "words": "auto",
        "previewApi": false,
        "faviconApi": false
    },
    "status": {
        "autoBackupRestored": false
    },
    "settings": {
        "channel": "stable",
        "nightlies": false,
        "handbook": false,
        "performance": 5
    },
    "encryption": {
        "sse": {
            "SSEv1r1": false,
            "SSEv1r2": true,
            "SSEv2r1": false,
            "SSEv3r1": false,
            "none": false,
            "default": "SSEv1r2"
        },
        "cse": {
            "CSEv1r1": false,
            "none": true,
            "default": "none"
        }
    }
}

Client Information

Browser and Version: not relevant Client OS and Version: not relevant

Bug description

The recently installed passwords app creates triples of error messages in the Nextcloud log (up to now 8 such triples in the last 4 days):

Fatal   passwords   DivisionByZeroError Division by zero
Fatal   passwords   DivisionByZeroError Division by zero
Fatal   passwords   ApiException Internal Website Preview API Error

According to the raw log, the division by zero occurs in apps/passwords/lib/Helper/Image/AbstractImageHelper.php line 48.

Steps to reproduce

User actions which triggers access to API GET /index.php/apps/passwords/api/1.0/service/preview/[...].

Expected behavior

No fatal errors from passwords.

Nextcloud Logs

ommitted for privacy reasons

Browser Logs

not relevant