Exploit database

GH-9a017fa45abc7e1f8f6ba6e1285cae54

iplayforsg/cve-2023-51444

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-51444

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files75Next files →

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

web/core/src/main/java/org/geoserver/web/wicket/DecimalListTextField.java

Java · 1,440 bytes
/* (c) 2016 Open Source Geospatial Foundation - all rights reserved
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.
 */
package org.geoserver.web.wicket;

import java.util.List;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.model.IModel;
import org.apache.wicket.util.convert.IConverter;

/**
 * A TextField for a space separated list of {@code java.lang.Double} representations that allows
 * for arbitrary number of decimal places, since the default TextField rounds up doubles to three
 * decimals.
 *
 * @author Andrea Aime - GeoSolutions
 */
public class DecimalListTextField extends TextField<List> {

    private static final long serialVersionUID = 1L;

    DecimalListConverter decimalListConverter;

    public DecimalListTextField(String id, IModel<List> model) {
        super(id, model, List.class);
        decimalListConverter = new DecimalListConverter();
        setConvertEmptyInputStringToNull(false);
    }

    public void setMaximumFractionDigits(int maximumFractionDigits) {
        decimalListConverter.setMaximumFractionDigits(maximumFractionDigits);
    }

    @SuppressWarnings("unchecked")
    @Override
    public <C> IConverter<C> getConverter(Class<C> type) {
        if (List.class.isAssignableFrom(type)) {
            return (IConverter<C>) decimalListConverter;
        }
        return super.getConverter(type);
    }
}