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

cadc-access-control-server: skip when invalid group name #161

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cadc-access-control-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sourceCompatibility = 1.8

group = 'org.opencadc'

version = '1.3.33'
version = '1.3.35'

description = 'OpenCADC User+Group server library'
def git_url = 'https://github.com/opencadc/ac'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
******************* CANADIAN ASTRONOMY DATA CENTRE *******************
************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES **************
*
* (c) 2019. (c) 2019.
* (c) 2023. (c) 2023.
* Government of Canada Gouvernement du Canada
* National Research Council Conseil national de recherches
* Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6
Expand Down Expand Up @@ -473,8 +473,12 @@ public void searchEntryReturned(SearchResultEntry sre)
String gname = sre.getAttributeValue(LDAP_CN);
String gidstr = sre.getAttributeValue(LDAP_GID_NUMBER);
Integer gid = Integer.valueOf(gidstr);
PosixGroup pg = new PosixGroup(gid, new GroupURI(gmsResourceID, gname));
ret.add(pg);
try {
PosixGroup pg = new PosixGroup(gid, new GroupURI(gmsResourceID, gname));
ret.add(pg);
} catch (IllegalArgumentException ex) {
logger.warn("invalid group name: " + gname + " -- SKIP");
}

long t2 = System.currentTimeMillis();
long dt = t2 - t1;
Expand Down
Loading