Skip to content

Commit 0eaff10

Browse files
committed
Block all use of the app by banned users
This is sad, but it's the only way to stop some substantial abuse of users who keep signing up for subscriptions, using the app, and then disputing the charges with their banks (resulting in fines for HTTP Toolkit, and risking a permanent ban from payment providers). These users are either stealing credit cards, from innocent users elsewhere who report the charges, or they're using their own cards and lying to the bank to say that they don't recognize the charge to avoid paying for software they've purchased and used. Either way, it seems legitimate to block them entirely. Please don't file chargebacks, they're an existential risk for the tool for everybody, and I'm quite happy to give refunds to anybody who isn't satisfied with Pro.
1 parent 4f63c9c commit 0eaff10

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/model/account/account-store.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ export class AccountStore {
7171
// Include the user email in error reports whilst they're logged in.
7272
// Useful generally, but especially for checkout/subscription issues.
7373
reportErrorsAsUser(this.user.email);
74+
75+
if (this.user.banned) {
76+
alert('Your account has been blocked for abuse. Please contact [email protected].');
77+
window.close();
78+
}
7479
}.bind(this));
7580

7681
readonly subscriptionPlans = SubscriptionPlans;

src/model/account/auth.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ type AppData = {
223223
cancel_url?: string;
224224
last_receipt_url?: string;
225225
feature_flags?: string[];
226+
banned?: boolean;
226227
}
227228

228229
type SubscriptionData = {
@@ -237,11 +238,12 @@ type SubscriptionData = {
237238

238239
export type User = {
239240
email?: string;
241+
banned: boolean;
240242
subscription?: SubscriptionData;
241243
featureFlags: string[];
242244
};
243245

244-
const anonUser = (): User => ({ featureFlags: [] });
246+
const anonUser = (): User => ({ featureFlags: [], banned: false });
245247

246248
/*
247249
* Synchronously gets the last received user data, _without_
@@ -317,7 +319,8 @@ function parseUserData(userJwt: string | null): User {
317319
subscription: _.every(_.omit(subscription, ...optionalFields))
318320
? subscription as SubscriptionData
319321
: undefined,
320-
featureFlags: appData.feature_flags || []
322+
featureFlags: appData.feature_flags || [],
323+
banned: !!appData.banned
321324
};
322325
}
323326

0 commit comments

Comments
 (0)