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 files11

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

web/security/core/src/main/java/org/geoserver/security/web/group/GroupListProvider.java

Java · 2,156 bytes
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
 * (c) 2001 - 2013 OpenPlans
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.
 */
package org.geoserver.security.web.group;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.SortedSet;
import java.util.TreeSet;
import org.geoserver.security.GeoServerUserGroupService;
import org.geoserver.security.impl.GeoServerUserGroup;
import org.geoserver.web.wicket.GeoServerDataProvider;

/**
 * Page listing for {@link GeoServerUserGroup} objects
 *
 * @author christian
 */
@SuppressWarnings("serial")
public class GroupListProvider extends GeoServerDataProvider<GeoServerUserGroup> {

    public static final Property<GeoServerUserGroup> GROUPNAME =
            new BeanProperty<>("groupname", "groupname");
    public static final Property<GeoServerUserGroup> ENABLED =
            new BeanProperty<>("enabled", "enabled");
    protected String userGroupServiceName;

    public GroupListProvider(String userGroupServiceName) {
        this.userGroupServiceName = userGroupServiceName;
    }

    @Override
    protected List<GeoServerUserGroup> getItems() {
        SortedSet<GeoServerUserGroup> groups = null;
        try {
            GeoServerUserGroupService service = null;
            if (userGroupServiceName != null)
                service =
                        getApplication()
                                .getSecurityManager()
                                .loadUserGroupService(userGroupServiceName);

            if (service == null) groups = new TreeSet<>();
            else groups = service.getUserGroups();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        List<GeoServerUserGroup> groupList = new ArrayList<>();
        groupList.addAll(groups);
        return groupList;
    }

    @Override
    protected List<Property<GeoServerUserGroup>> getProperties() {
        List<Property<GeoServerUserGroup>> result = new ArrayList<>();
        result.add(GROUPNAME);
        result.add(ENABLED);
        return result;
    }
}