Skip to content

fix: Revert bad string replacements #2513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/raven-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
- fix: Remove a redundant try-catch block (#445)
- fix: Do not override context when capturing non-error exceptions (#444)
- fix: Update stack-trace to handle spaces in paths (#437)
- docs: Remove private _DSNs from the docs (#447)
- docs: Remove private DSNs from the docs (#447)
- docs: Update Usage docs to include Domains in Promise support (#438)

## 2.4.2 - 2018-02-27
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ extend(Raven.prototype, {
'X-Sentry-Auth': utils.getAuthHeader(
timestamp,
self.dsn.public_key,
self.dsn.private __key
self.dsn.private_key
),
'Content-Type': 'application/octet-stream',
'Content-Length': message.length
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ module.exports.parseDSN = function parseDSN(dsn) {
};

if (parsed.auth.split(':')[1]) {
response.private __key = parsed.auth.split(':')[1];
response.private_key = parsed.auth.split(':')[1];
}

if (~response.protocol.indexOf('+')) {
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/capture.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
var Raven = require('../../');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/capture_callback.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/capture_with_second_error.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/domain_capture.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
var Raven = require('../../');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/domain_capture_callback.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/domain_throw_on_send.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

Raven.config(dsn).install(function(err, sendErr) {
assert.ok(err instanceof Error);
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/throw_on_fatal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
var Raven = require('../../');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/throw_on_send.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

Raven.config(dsn).install(function(err, sendErr) {
assert.ok(err instanceof Error);
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/manual/context-memory.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
var Raven = require('../../');
Raven.config('https://public:private _@app.getsentry.com/12345').install();
Raven.config('https://public:private@app.getsentry.com/12345').install();

// We create a bunch of contexts, capture some breadcrumb data in all of them,
// then watch memory usage. It'll go up to ~40 megs then after 10 or 20 seconds
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/manual/express-patient.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ console.log = function () {};

var Raven = require('../../');

var sentryDsn = 'https://public:private _@app.getsentry.com/269';
var sentryDsn = 'https://public:private@app.getsentry.com/269';
Raven.config(sentryDsn, {
autoBreadcrumbs: true
}).install();
Expand Down
20 changes: 10 additions & 10 deletions packages/raven-node/test/raven.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var raven = require('../'),
zlib = require('zlib'),
child_process = require('child_process');

var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var _oldConsoleWarn = console.warn;

Expand Down Expand Up @@ -53,7 +53,7 @@ describe('raven.Client', function() {
var expected = {
protocol: 'https',
public_key: 'public',
private __key: 'private _',
private_key: 'private',
host: 'app.getsentry.com',
path: '/',
project_id: '269',
Expand All @@ -70,7 +70,7 @@ describe('raven.Client', function() {
var expected = {
protocol: 'https',
public_key: 'abc',
private __key: '123',
private_key: '123',
host: 'app.getsentry.com',
path: '/',
project_id: '1',
Expand All @@ -86,7 +86,7 @@ describe('raven.Client', function() {
var expected = {
protocol: 'https',
public_key: 'abc',
private __key: '123',
private_key: '123',
host: 'app.getsentry.com',
path: '/',
project_id: '1',
Expand Down Expand Up @@ -208,7 +208,7 @@ describe('raven.Client', function() {
});

it('should allow for attaching stacktrace', function(done) {
var dsn = 'https://public:private _@app.getsentry.com:8443/269';
var dsn = 'https://public:private@app.getsentry.com:8443/269';
var client = new raven.Client(dsn, {
stacktrace: true
});
Expand Down Expand Up @@ -317,7 +317,7 @@ describe('raven.Client', function() {
.post('/api/269/store/', '*')
.reply(200, 'OK');

var dsn = 'https://public:private _@app.getsentry.com:8443/269';
var dsn = 'https://public:private@app.getsentry.com:8443/269';
var client = new raven.Client(dsn);
client.on('logged', function() {
scope.done();
Expand Down Expand Up @@ -364,7 +364,7 @@ describe('raven.Client', function() {
return 'OK';
});

var dsn = 'https://public:private _@app.getsentry.com:8443/269';
var dsn = 'https://public:private@app.getsentry.com:8443/269';
var client = new raven.Client(dsn);
client.on('logged', function() {
scope.done();
Expand Down Expand Up @@ -998,13 +998,13 @@ describe('raven.Client', function() {
var expected = {
protocol: 'https',
public_key: 'public',
private __key: 'private _',
private_key: 'private',
host: 'app.getsentry.com',
path: '/',
project_id: '269',
port: 443
};
var dsn = 'heka+https://public:private _@app.getsentry.com/269';
var dsn = 'heka+https://public:private@app.getsentry.com/269';
var client = new raven.Client(dsn, {
transport: 'some_heka_instance'
});
Expand All @@ -1013,7 +1013,7 @@ describe('raven.Client', function() {
});

it('should use a DSN subpath when sending requests', function(done) {
var dsn = 'https://public:private _@app.getsentry.com/some/path/269';
var dsn = 'https://public:private@app.getsentry.com/some/path/269';
var client = new raven.Client(dsn);

var scope = nock('https://app.getsentry.com')
Expand Down
10 changes: 5 additions & 5 deletions packages/raven-node/test/raven.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('raven.utils', function() {
var expected = {
protocol: 'https',
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
host: 'app.getsentry.com',
path: '/',
project_id: '269',
Expand All @@ -46,7 +46,7 @@ describe('raven.utils', function() {
var expected = {
protocol: 'http',
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
host: 'mysentry.com',
path: '/some/other/path/',
project_id: '269',
Expand All @@ -62,7 +62,7 @@ describe('raven.utils', function() {
var expected = {
protocol: 'https',
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
host: 'mysentry.com',
path: '/some/other/path/',
project_id: '269',
Expand Down Expand Up @@ -91,7 +91,7 @@ describe('raven.utils', function() {
var expected = {
protocol: 'https',
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
host: 'mysentry.com',
path: '/some/other/path/',
project_id: '269',
Expand All @@ -100,7 +100,7 @@ describe('raven.utils', function() {
dsn.should.eql(expected);
});

it('should parse DSN without private _key', function() {
it('should parse DSN without private key', function() {
var dsn = raven.utils.parseDSN(
'https://8769c40cf49c4cc58b51fa45d8e2d166@mysentry.com:8443/some/other/path/269'
);
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/dsn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface DsnComponents {
protocol: DsnProtocol;
/** Public authorization key. */
user: string;
/** private _authorization key (deprecated, optional). */
/** Private authorization key (deprecated, optional). */
pass?: string;
/** Hostname of the Sentry instance. */
host: string;
Expand All @@ -28,7 +28,7 @@ export interface Dsn extends DsnComponents {
* Renders the string representation of this Dsn.
*
* By default, this will render the public representation without the password
* component. To get the deprecated private _representation, set `withPassword`
* component. To get the deprecated private representation, set `withPassword`
* to true.
*
* @param withPassword When set to true, the password will be included.
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"homepage": "https://github.com/getsentry/raven-js/tree/master/packages/typescript",
"author": "Sentry",
"license": "BSD-3-Clause",
"private _": false,
"private": false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this was broken for quite some time, is this key actually relevant? Isn't "private": false the default?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/dsn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class Dsn implements DsnComponents {
public protocol!: DsnProtocol;
/** Public authorization key. */
public user!: string;
/** private _authorization key (deprecated, optional). */
/** Private authorization key (deprecated, optional). */
public pass!: string;
/** Hostname of the Sentry instance. */
public host!: string;
Expand All @@ -40,7 +40,7 @@ export class Dsn implements DsnComponents {
* Renders the string representation of this Dsn.
*
* By default, this will render the public representation without the password
* component. To get the deprecated private _representation, set `withPassword`
* component. To get the deprecated private representation, set `withPassword`
* to true.
*
* @param withPassword When set to true, the password will be included.
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface SentryGlobal {
}

/**
* Requires a module which is protected _against bundler minification.
* Requires a module which is protected against bundler minification.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what got me started... I thought "why _against?!". The rest is Git history.

*
* @param request The module path to resolve
*/
Expand Down