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 files4

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

extension/ogr/ogr-wps/src/main/java/org/geoserver/wps/ogr/OgrBinaryPPIO.java

Java · 1,884 bytes
/* (c) 2015 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.wps.ogr;

import java.io.InputStream;
import java.io.OutputStream;
import net.opengis.wfs.FeatureCollectionType;
import net.opengis.wfs.WfsFactory;
import org.geoserver.platform.Operation;
import org.geoserver.wfs.response.Ogr2OgrOutputFormat;
import org.geoserver.wps.ppio.BinaryPPIO;
import org.geotools.feature.FeatureCollection;

/** Process binary output parameter using ogr2ogr process */
public class OgrBinaryPPIO extends BinaryPPIO {

    private Ogr2OgrOutputFormat ogr2OgrOutputFormat;

    private Operation operation;

    private String fileExtension;

    public OgrBinaryPPIO(
            String mimeType,
            String fileExtension,
            Ogr2OgrOutputFormat ogr2OgrOutputFormat,
            Operation operation) {
        super(FeatureCollectionType.class, FeatureCollection.class, mimeType);
        this.ogr2OgrOutputFormat = ogr2OgrOutputFormat;
        this.operation = operation;
        this.fileExtension = fileExtension;
    }

    @Override
    @SuppressWarnings("unchecked") // EMF model without generics
    public void encode(Object value, OutputStream os) throws Exception {
        FeatureCollection<?, ?> features = (FeatureCollection<?, ?>) value;
        FeatureCollectionType fc = WfsFactory.eINSTANCE.createFeatureCollectionType();
        fc.getFeature().add(features);
        ogr2OgrOutputFormat.write(fc, os, this.operation);
    }

    @Override
    public String getFileExtension() {
        return this.fileExtension;
    }

    @Override
    public PPIODirection getDirection() {
        return PPIODirection.ENCODING;
    }

    @Override
    public Object decode(InputStream input) throws Exception {
        return null;
    }
}