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

Crash when submit a form with IBAN field #5016

Closed
1 task done
max3163 opened this issue Dec 20, 2024 · 1 comment
Closed
1 task done

Crash when submit a form with IBAN field #5016

max3163 opened this issue Dec 20, 2024 · 1 comment
Labels
upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium.

Comments

@max3163
Copy link

max3163 commented Dec 20, 2024

Is there an existing issue for this?

  • I have searched both open/closed issues, no issue already exists.

CefSharp Version

128

Operating System

Windows 10 / 11

Architecture

x64

.Net Version

4.8

Implementation

WinForms

Reproduction Steps

Load a page with a form which contain an IBAN field and submit it.

With cefclient.exe --multi-threaded-message-loop --no-sandbox --use-alloy-style

Exemple

<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Formulaire IBAN</title>
    <style>
        body {
            font-family: sans-serif;
        }
        form {
            width: 400px;
            margin: 0 auto;
            padding: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        label {
            display: block;
            margin-bottom: 5px;
        }
        input[type="text"] {
            width: 100%;
            padding: 8px;
            margin-bottom: 10px;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
        input[type="submit"] {
            background-color: #4CAF50;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        input[type="submit"]:hover {
            background-color: #45a049;
        }
        .error {
            color: red;
            margin-top: 5px;
        }
    </style>
</head>
<body>

    <h1>Formulaire de saisie IBAN</h1>

    <form id="ibanForm" action="#" method="post">
        <label for="iban">IBAN :</label>
        <input type="text" value="FR7630004000031234567890143" id="iban" name="iban" placeholder="FRXX XXXX XXXX XXXX XXXX XXXX XXX" required>
        <div id="ibanError" class="error"></div>

        <input type="submit" value="Envoyer">
    </form>

    <script>
        const form = document.getElementById('ibanForm');
        const ibanInput = document.getElementById('iban');
        const ibanError = document.getElementById('ibanError');

        form.addEventListener('submit', function(event) {
            ibanError.textContent = ''; // Efface les erreurs précédentes
            const ibanValue = ibanInput.value.trim().replace(/\s/g, ''); // Supprime les espaces

            if (!isValidIBAN(ibanValue)) {
                ibanError.textContent = 'Veuillez saisir un IBAN valide.';
                event.preventDefault(); // Empêche la soumission du formulaire
            }
        });

        function isValidIBAN(iban) {
        if (!iban) return false;

        iban = iban.toUpperCase().replace(/ /g, "");

        if (!/^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$/.test(iban)) return false;

        iban = iban.substring(4) + iban.substring(0, 4);
        let digits = "";
        for (let i in iban) {
            digits += parseInt(iban[i], 36);
        }
        return (parseInt(digits) % 97 === 1);

        }
    </script>

</body>
</html>

It crash.

But no crash without allow style

cefclient.exe --multi-threaded-message-loop --no-sandbox

The IBAN manager is display :

{DFC5A5DA-5508-42A3-BFEE-8644745A6F21}

I search a way to disable the IBAN manager without sucess.

Expected behavior

Not crash :)

Actual behavior

It crash

Regression?

It work correctly without Chrome Runtime on 126 and above

Known Workarounds

No response

Does this problem also occur in the CEF Sample Application

Yes using WPF/OffScreen command line args

Other information

No response

@max3163 max3163 changed the title Crash when wubmit a form with IBAN field Crash when submit a form with IBAN field Dec 20, 2024
@amaitland amaitland added the upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium. label Dec 20, 2024
@amaitland
Copy link
Member

Closing as upstream. This is a known issue in CEF.

chromiumembedded/cef#3796

There is a suggested workaround at chromiumembedded/cef#3796 (comment)

@amaitland amaitland closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium.
Projects
None yet
Development

No branches or pull requests

2 participants