소스 검색

companion: use full path for provider URL when the root path depends on user input (#2176)

Ifedapo .A. Olarewaju 5 년 전
부모
커밋
40bb4989e8
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      packages/@uppy/companion/src/server/provider/facebook/index.js

+ 3 - 3
packages/@uppy/companion/src/server/provider/facebook/index.js

@@ -37,7 +37,7 @@ class Facebook extends Provider {
     }
 
     this.client
-      .get(path)
+      .get(`https://graph.facebook.com/${path}`)
       .qs(qs)
       .auth(token)
       .request((err, resp, body) => {
@@ -76,7 +76,7 @@ class Facebook extends Provider {
 
   download ({ id, token }, onData) {
     return this.client
-      .get(id)
+      .get(`https://graph.facebook.com/${id}`)
       .qs({ fields: 'images' })
       .auth(token)
       .request((err, resp, body) => {
@@ -100,7 +100,7 @@ class Facebook extends Provider {
 
   size ({ id, token }, done) {
     return this.client
-      .get(id)
+      .get(`https://graph.facebook.com/${id}`)
       .qs({ fields: 'images' })
       .auth(token)
       .request((err, resp, body) => {