Skip to content

Commit

Permalink
Merge pull request #102 from commercetools/kinghin.leung/fix-critical…
Browse files Browse the repository at this point in the history
…-vulnerabilities

fix(processor): fix critical vulnerabilities for connect certification
  • Loading branch information
leungkinghin-ct authored Apr 15, 2024
2 parents 17f0130 + dfdf07f commit 53d83ab
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 25 deletions.
4 changes: 2 additions & 2 deletions enabler/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion enabler/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "enabler",
"private": true,
"version": "4.0.1",
"version": "4.0.2",
"type": "module",
"scripts": {
"dev": "vite --port 3000",
Expand Down
4 changes: 2 additions & 2 deletions processor/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions processor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "payment-integration-adyen",
"version": "4.0.1",
"version": "4.0.2",
"description": "Payment integration with Adyen",
"main": "dist/server.js",
"scripts": {
Expand Down Expand Up @@ -55,4 +55,4 @@
"ts-node": "10.9.2",
"typescript": "5.4.5"
}
}
}
2 changes: 0 additions & 2 deletions processor/src/libs/fastify/hooks/hmac-auth.hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { ErrorAuthErrorResponse } from '@commercetools/connect-payments-sdk';
import { NotificationRequestDTO } from '../../../dtos/adyen-payment.dto';

export class HmacAuthHook {
constructor() {}

public authenticate() {
return async (request: FastifyRequest) => {
const data = request.body as NotificationRequestDTO;
Expand Down
2 changes: 0 additions & 2 deletions processor/src/services/converters/cancel-payment.converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { PaymentCancelRequest } from '@adyen/api-library/lib/src/typings/checkou
import { CancelPaymentRequest } from '../types/operation.type';

export class CancelPaymentConverter {
constructor() {}

public convertRequest(opts: CancelPaymentRequest): PaymentCancelRequest {
return {
merchantAccount: config.adyenMerchantAccount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { PaymentCaptureRequest } from '@adyen/api-library/lib/src/typings/checko
import { CapturePaymentRequest } from '../types/operation.type';

export class CapturePaymentConverter {
constructor() {}

public convertRequest(opts: CapturePaymentRequest): PaymentCaptureRequest {
return {
merchantAccount: config.adyenMerchantAccount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { ConfirmPaymentRequestDTO } from '../../dtos/adyen-payment.dto';
import { PaymentDetailsRequest } from '@adyen/api-library/lib/src/typings/checkout/paymentDetailsRequest';

export class ConfirmPaymentConverter {
constructor() {}

public convertRequest(opts: { data: ConfirmPaymentRequestDTO }): PaymentDetailsRequest {
return {
...opts.data,
Expand Down
2 changes: 0 additions & 2 deletions processor/src/services/converters/create-payment.converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { buildReturnUrl, populateCartAddress, populateLineItems } from './helper
import { CreatePaymentRequestDTO } from '../../dtos/adyen-payment.dto';

export class CreatePaymentConverter {
constructor() {}

public convertRequest(opts: { data: CreatePaymentRequestDTO; cart: Cart; payment: Payment }): PaymentRequest {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { paymentReference: _, ...requestData } = opts.data;
Expand Down
2 changes: 0 additions & 2 deletions processor/src/services/converters/create-session.converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { CreateSessionRequestDTO } from '../../dtos/adyen-payment.dto';
import { Cart, Payment } from '@commercetools/connect-payments-sdk';

export class CreateSessionConverter {
constructor() {}

public convertRequest(opts: {
data: CreateSessionRequestDTO;
cart: Cart;
Expand Down
2 changes: 0 additions & 2 deletions processor/src/services/converters/notification.converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { TransactionData, UpdatePayment, Money } from '@commercetools/connect-pa
import { UnsupportedNotificationError } from '../../errors/adyen-api.error';

export class NotificationConverter {
constructor() {}

public convert(opts: { data: NotificationRequestDTO }): UpdatePayment {
const item = opts.data.notificationItems[0].NotificationRequestItem;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { SupportedPaymentComponentsSchemaDTO } from '../../dtos/operations/payment-componets.dto';

export class PaymentComponentsConverter {
constructor() {}

public convertResponse(): SupportedPaymentComponentsSchemaDTO {
return {
components: [
Expand Down
2 changes: 0 additions & 2 deletions processor/src/services/converters/refund-payment.converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { PaymentRefundRequest } from '@adyen/api-library/lib/src/typings/checkou
import { RefundPaymentRequest } from '../types/operation.type';

export class RefundPaymentConverter {
constructor() {}

public convertRequest(opts: RefundPaymentRequest): PaymentRefundRequest {
return {
merchantAccount: config.adyenMerchantAccount,
Expand Down

0 comments on commit 53d83ab

Please sign in to comment.