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 files50

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

main/src/main/java/org/geoserver/catalog/impl/FilteredList.java

Java · 1,572 bytes
/* (c) 2017 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.catalog.impl;

import java.util.AbstractList;
import java.util.List;

/**
 * Allows exposing a filtered list of items, but keeping in synch the underlying full list on
 * modification
 *
 * @author Niels Charlier (grabbed from SecuredLayerGroupInfo.getLayers() inner class)
 */
public class FilteredList<T> extends AbstractList<T> {

    List<T> filtered;

    List<T> delegate;

    public FilteredList(List<T> filtered, List<T> delegate) {
        this.filtered = filtered;
        this.delegate = delegate;
    }

    @Override
    public T get(int index) {
        return filtered.get(index);
    }

    @Override
    public int size() {
        return filtered.size();
    }

    @Override
    public void add(int index, T element) {
        delegate.add(index, unwrap(element));
        filtered.add(index, element);
    }

    @Override
    public T set(int index, T element) {
        delegate.set(index, unwrap(element));
        return filtered.set(index, element);
    }

    @Override
    public T remove(int index) {
        delegate.remove(index);
        return filtered.remove(index);
    }

    @Override
    public boolean remove(Object o) {
        delegate.remove(o);
        return filtered.remove(o);
    }

    /** Allows to unwrap an element before setting it into the delegate list */
    protected T unwrap(T element) {
        return element;
    }
}