Skip to content

avoid running static initializers in CursorFactory.fromProto#310

Open
sahvx655-wq wants to merge 1 commit into
apache:mainfrom
sahvx655-wq:fix-cursorfactory-static-init
Open

avoid running static initializers in CursorFactory.fromProto#310
sahvx655-wq wants to merge 1 commit into
apache:mainfrom
sahvx655-wq:fix-cursorfactory-static-init

Conversation

@sahvx655-wq
Copy link
Copy Markdown

CursorFactory.fromProto resolves a wire-supplied class name with Class.forName(String), which initializes the class and runs its static initializer. The server hits this while parsing an ExecuteRequest from an untrusted client (StatementHandle -> Signature -> CursorFactory), so a client can make the server load and initialize any class on its classpath. Resolve with the three-arg form and initialize=false; the class is still linked but no static code runs at parse time.

@F21
Copy link
Copy Markdown
Member

F21 commented Jun 2, 2026

Can you please log the issue in JIRA @ https://issues.apache.org ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants