Skip to content

Commit 7a1fc91

Browse files
authored
Merge pull request #96 from ndaidong/v1.4.8
v1.4.8
2 parents c523441 + 9c7b43b commit 7a1fc91

File tree

7 files changed

+412
-14
lines changed

7 files changed

+412
-14
lines changed

SECURITY.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
The following versions are being supported with security updates.
6+
7+
| Version | Supported |
8+
| ------- | ------------------ |
9+
| 1.4.x | :white_check_mark: |
10+
| 1.3.x | :white_check_mark: |
11+
| 1.2.x | :white_check_mark: |
12+
| 1.1.x | :white_check_mark: |
13+
| 1.0.x | :white_check_mark: |
14+
| 0.x.x | :x: |
15+
16+
## Reporting a Vulnerability
17+
18+
If you discover a security issue, please bring it to their attention right away!
19+
20+
Please **DO NOT** file a public issue, instead send your report privately to `security-report@pwshub.com`.
21+
22+
Security reports are greatly appreciated and we will publicly thank you for it, although we keep your name confidential if you request it.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.4.7",
2+
"version": "1.4.8",
33
"name": "oembed-parser",
44
"description": "Get oEmbed data from given URL.",
55
"homepage": "https://www.npmjs.com/package/oembed-parser",
@@ -23,12 +23,12 @@
2323
"reset": "node reset"
2424
},
2525
"dependencies": {
26-
"node-fetch": "^2.6.1"
26+
"cross-fetch": "^3.1.4"
2727
},
2828
"devDependencies": {
2929
"eslint-config-goes": "^1.2.0",
30-
"jest": "^26.6.3",
31-
"typescript": "^4.2.4"
30+
"jest": "^27.1.0",
31+
"typescript": "^4.4.2"
3232
},
3333
"keywords": [
3434
"oembed",

src/main.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ test(`test extract Instagram link`, async () => {
127127
const result = await extract(url);
128128
expect(hasInstagramKeys(result)).toBe(true);
129129
} catch (err) {
130-
expect(err).toBe(null);
130+
// could not wait for reviewing 'Oembed Read' feature
131+
// https://developers.facebook.com/docs/apps/review
132+
expect(err).toBeTruthy();
131133
}
132134
});
133135

src/utils/fetchEmbed.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// utils -> fetchEmbed
22

3-
const fetch = require('node-fetch').default;
3+
const fetch = require('cross-fetch');
44

55
const isFacebookGraphDependent = (provider) => {
66
return provider.provider_name === 'Facebook' || provider.provider_name === 'Instagram';
77
};
88

99
const getFacebookGraphToken = () => {
1010
const env = process.env || {};
11-
const appId = env.FACEBOOK_APP_ID || '365101066946402';
12-
const clientToken = env.FACEBOOK_CLIENT_TOKEN || 'a56861eb5b787f9e9a18e4e09ea5c873';
11+
const appId = env.FACEBOOK_APP_ID || '845078789498971';
12+
const clientToken = env.FACEBOOK_CLIENT_TOKEN || '0d4b05bf3f7e201c636441912423a491';
1313

1414
return `access_token=${appId}|${clientToken}`;
1515
};

src/utils/providers.backup.json

Lines changed: 185 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,8 @@
12031203
"endpoints": [
12041204
{
12051205
"schemes": [
1206-
"https://app.gong.io/call"
1206+
"https://app.gong.io/call",
1207+
"https://app.gong.io/call?id=*"
12071208
],
12081209
"url": "https://app.gong.io/oembed",
12091210
"formats": [
@@ -3806,5 +3807,188 @@
38063807
"discovery": true
38073808
}
38083809
]
3810+
},
3811+
{
3812+
"provider_name": "Altium LLC",
3813+
"provider_url": "https://altium.com",
3814+
"endpoints": [
3815+
{
3816+
"schemes": [
3817+
"https://altium.com/viewer/*"
3818+
],
3819+
"url": "https://viewer.altium.com/shell/oembed",
3820+
"formats": [
3821+
"json"
3822+
]
3823+
}
3824+
]
3825+
},
3826+
{
3827+
"provider_name": "Bopp",
3828+
"provider_url": "http://www.bopp.tk",
3829+
"endpoints": [
3830+
{
3831+
"schemes": [
3832+
"http://i.bopp.tk/*"
3833+
],
3834+
"url": "http://api.bopp.tk/v1/oembed",
3835+
"discovery": true
3836+
}
3837+
]
3838+
},
3839+
{
3840+
"provider_name": "Curated",
3841+
"provider_url": "https://curated.co/",
3842+
"endpoints": [
3843+
{
3844+
"schemes": [
3845+
"https://*.curated.co/*"
3846+
],
3847+
"url": "https://api.curated.co/oembed",
3848+
"formats": [
3849+
"json"
3850+
],
3851+
"discovery": true
3852+
}
3853+
]
3854+
},
3855+
{
3856+
"provider_name": "HippoVideo",
3857+
"provider_url": "https://hippovideo.io",
3858+
"endpoints": [
3859+
{
3860+
"schemes": [
3861+
"http://*.hippovideo.io/*",
3862+
"https://*.hippovideo.io/*"
3863+
],
3864+
"url": "https://www.hippovideo.io/services/oembed",
3865+
"discovery": true
3866+
}
3867+
]
3868+
},
3869+
{
3870+
"provider_name": "Idomoo",
3871+
"provider_url": "https://idomoo.com/",
3872+
"endpoints": [
3873+
{
3874+
"schemes": [
3875+
"https://*.idomoo.com/*"
3876+
],
3877+
"url": "https://oembed.idomoo.com/oembed",
3878+
"formats": [
3879+
"json"
3880+
]
3881+
}
3882+
]
3883+
},
3884+
{
3885+
"provider_name": "Insticator Inc",
3886+
"provider_url": "https://www.insticator.com/",
3887+
"endpoints": [
3888+
{
3889+
"schemes": [
3890+
"https://ppa.insticator.com/embed-unit/*"
3891+
],
3892+
"url": "https://www.insticator.com/oembed",
3893+
"discovery": true
3894+
}
3895+
]
3896+
},
3897+
{
3898+
"provider_name": "LottieFiles",
3899+
"provider_url": "https://lottiefiles.com/",
3900+
"endpoints": [
3901+
{
3902+
"schemes": [
3903+
"https://lottiefiles.com/*",
3904+
"https://*.lottiefiles.com/*"
3905+
],
3906+
"url": "https://embed.lottiefiles.com/oembed",
3907+
"discovery": true,
3908+
"formats": [
3909+
"json"
3910+
]
3911+
}
3912+
]
3913+
},
3914+
{
3915+
"provider_name": "Minerva",
3916+
"provider_url": "https://www.minervaknows.com",
3917+
"endpoints": [
3918+
{
3919+
"schemes": [
3920+
"https://www.minervaknows.com/featured-recipes/*",
3921+
"https://www.minervaknows.com/themes/*",
3922+
"https://www.minervaknows.com/themes/*/recipes/*",
3923+
"https://app.minervaknows.com/recipes/*",
3924+
"https://app.minervaknows.com/recipes/*/follow"
3925+
],
3926+
"url": "https://oembed.minervaknows.com",
3927+
"formats": [
3928+
"json"
3929+
],
3930+
"discovery": true
3931+
}
3932+
]
3933+
},
3934+
{
3935+
"provider_name": "Omny Studio",
3936+
"provider_url": "https://omnystudio.com",
3937+
"endpoints": [
3938+
{
3939+
"schemes": [
3940+
"https://omny.fm/shows/*"
3941+
],
3942+
"url": "https://omny.fm/oembed",
3943+
"formats": [
3944+
"json"
3945+
]
3946+
}
3947+
]
3948+
},
3949+
{
3950+
"provider_name": "Prezi Video",
3951+
"provider_url": "https://prezi.com/",
3952+
"endpoints": [
3953+
{
3954+
"schemes": [
3955+
"https://prezi.com/v/*",
3956+
"https://*.prezi.com/v/*"
3957+
],
3958+
"url": "https://prezi.com/v/oembed",
3959+
"discovery": true
3960+
}
3961+
]
3962+
},
3963+
{
3964+
"provider_name": "SproutVideo",
3965+
"provider_url": "https://sproutvideo.com",
3966+
"endpoints": [
3967+
{
3968+
"schemes": [
3969+
"https://sproutvideo.com/videos/*",
3970+
"https://*.vids.io/videos/*"
3971+
],
3972+
"url": "http://sproutvideo.com/oembed.{format}",
3973+
"formats": [
3974+
"json",
3975+
"xml"
3976+
],
3977+
"discovery": true
3978+
}
3979+
]
3980+
},
3981+
{
3982+
"provider_name": "Upec.Pod",
3983+
"provider_url": "https://pod.u-pec.fr/",
3984+
"endpoints": [
3985+
{
3986+
"schemes": [
3987+
"https://pod.u-pec.fr/video/*"
3988+
],
3989+
"url": "https://pod.u-pec.fr/oembed",
3990+
"discovery": true
3991+
}
3992+
]
38093993
}
38103994
]

0 commit comments

Comments
 (0)