OHDSI / OHDSI/WebAPI

Dead check in UpdateAccessTokenFilter.java, possible security issue

Open
#2,320 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
151
Forks
183
Avg merge
14m
Merged PRs (30d)
2

Description

Expected behavior

The jwt variable should not always be null or the check should be removed.

Actual behavior

The jwt is always null here:
https://github.com/OHDSI/WebAPI/blob/723eb4cbe470dc58d1fa340add5c2d9cc89a4e28/src/main/java/org/ohdsi/webapi/shiro/filters/UpdateAccessTokenFilter.java#L124

Steps to reproduce behavior

Just reading the code is sufficient to conclude that.

I am currently making changes to this class, so it would be very useful to know what the original intention of this part was.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/main/java/org/ohdsi/webapi/shiro/filters/UpdateAccessTokenFilter.java at line 124 and trace how the jwt variable is assigned and used in the surrounding filter flow. Determine the original intent of the check and document or implement the appropriate correction; done means the jwt handling is no longer an unexplained dead check or is removed if it has no valid purpose.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.