From 1236e6b71985d3f5d7084a5d9d100b77db45bce0 Mon Sep 17 00:00:00 2001 From: Anwarul Islam Date: Tue, 29 Oct 2024 21:05:13 +0600 Subject: [PATCH] fix: scrollbar appearing on digest auth input fields and other improvements (#4492) Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com> --- packages/hoppscotch-cli/src/utils/request.ts | 1 - .../src/components/http/Authorization.vue | 2 -- .../src/components/http/authorization/Digest.vue | 12 ++++-------- .../inspection/inspectors/authorization.inspector.ts | 6 +++++- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/hoppscotch-cli/src/utils/request.ts b/packages/hoppscotch-cli/src/utils/request.ts index ab38f983d..97bd02041 100644 --- a/packages/hoppscotch-cli/src/utils/request.ts +++ b/packages/hoppscotch-cli/src/utils/request.ts @@ -240,7 +240,6 @@ export const processRequest = // Updating report for errors & current result report.errors.push(preRequestRes.left); - console.error(`Report result is `, report.result); report.result = report.result; } else { // Updating effective-request and consuming updated envs after pre-request script execution diff --git a/packages/hoppscotch-common/src/components/http/Authorization.vue b/packages/hoppscotch-common/src/components/http/Authorization.vue index c18f280a8..f09557b5a 100644 --- a/packages/hoppscotch-common/src/components/http/Authorization.vue +++ b/packages/hoppscotch-common/src/components/http/Authorization.vue @@ -272,8 +272,6 @@ const selectDigestAuthType = () => { algorithm = "MD5", } = auth.value as HoppRESTAuthDigest - console.error(`Auth is `, auth.value) - auth.value = { ...auth.value, authType: "digest", diff --git a/packages/hoppscotch-common/src/components/http/authorization/Digest.vue b/packages/hoppscotch-common/src/components/http/authorization/Digest.vue index 18770f8d8..1f29843e0 100644 --- a/packages/hoppscotch-common/src/components/http/authorization/Digest.vue +++ b/packages/hoppscotch-common/src/components/http/authorization/Digest.vue @@ -36,8 +36,7 @@ :auto-complete-env="true" :placeholder="`${t( 'authorization.digest.realm' - )} (e.g. testrealm@example.com) - `" + )} (e.g. testrealm@example.com)`" :envs="envs" /> @@ -98,8 +97,7 @@ @@ -108,8 +106,7 @@ @@ -118,8 +115,7 @@ diff --git a/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.ts b/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.ts index 43a801606..4a9818abb 100644 --- a/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.ts +++ b/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.ts @@ -6,6 +6,7 @@ import { Service } from "dioc" import { computed, markRaw, Ref } from "vue" import { getI18n } from "~/modules/i18n" +import { platform } from "~/platform" import { AgentInterceptorService } from "~/platform/std/interceptors/agent" import { InterceptorService } from "~/services/interceptor.service" import { RESTTabService } from "~/services/tab/rest" @@ -74,9 +75,12 @@ export class AuthorizationInspectorService const results: InspectorResult[] = [] // `Agent` interceptor is recommended while using Digest Auth + // TODO: Better check to detect the platform + // Interceptor check only applies to the browser platform const isUnsupportedInterceptor = + platform.interceptors.default === "browser" && this.interceptorService.currentInterceptorID.value !== - this.agentService.interceptorID + this.agentService.interceptorID const resolvedAuthType = this.resolveAuthType(auth)