[PR #4146] [MERGED] HSB-452 hotfix: storing user in local variable #4677

Closed
opened 2026-03-17 02:11:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4146
Author: @mirarifhasan
Created: 6/25/2024
Status: Merged
Merged: 6/25/2024
Merged by: @AndrewBastin

Base: nextHead: hotfix/user-last-active-interceptor


📝 Commits (2)

  • 61be3dd fix: storing user in local variable
  • f22cd92 chore: update pnpm-lock.yaml

📊 Changes

2 files changed (+5762 additions, -5431 deletions)

View changed files

📝 packages/hoppscotch-backend/src/interceptors/user-last-active-on.interceptor.ts (+10 -12)
📝 pnpm-lock.yaml (+5752 -5419)

📄 Description

Closes HSB-452

What's changed

In user-last-login.interceptor.ts, we previously used a class level global variable user. If multiple users send requests, there is a chance, the older user's value can be replaced by the new user's object.

In this PR, we used a local variable to mitigate this issue.

Notes to reviewers

Nil


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4146 **Author:** [@mirarifhasan](https://github.com/mirarifhasan) **Created:** 6/25/2024 **Status:** ✅ Merged **Merged:** 6/25/2024 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `next` ← **Head:** `hotfix/user-last-active-interceptor` --- ### 📝 Commits (2) - [`61be3dd`](https://github.com/hoppscotch/hoppscotch/commit/61be3ddff1ba8085c42d5e9fd0c4425bf574cdb6) fix: storing user in local variable - [`f22cd92`](https://github.com/hoppscotch/hoppscotch/commit/f22cd927cfc563932ff029a93a88a4d09a9acec7) chore: update pnpm-lock.yaml ### 📊 Changes **2 files changed** (+5762 additions, -5431 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/src/interceptors/user-last-active-on.interceptor.ts` (+10 -12) 📝 `pnpm-lock.yaml` (+5752 -5419) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> <!-- Issue # here --> Closes HSB-452 <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed <!-- Describe point by point the different things you have changed in this PR --> In `user-last-login.interceptor.ts`, we previously used a class level global variable `user`. If multiple users send requests, there is a chance, the older user's value can be replaced by the new user's object. In this PR, we used a local variable to mitigate this issue. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> Nil --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:11:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4677
No description provided.