URL to open plunker running the script - plunker

I'm trying to use plunker it for oauth authentication. To do so, I need a url that my script can GET which will give a plunker page running my script.
In JSFiddle, I use https://fiddle.jshell.net/my_name/fiddle_id/show/
is there a way to do that in plunker?

Saved Plunks are available at http(s)://run.plnkr.co/plunk/{plunkId}/*. The dynamic previews that are generated as you edit your code are at http(s)://run.plnkr.co/preview/{previewId}/* but these urls expire after a short period of time.

Related

out of scope error shown in ajax spider attack in zap

I am using OWASP ZAP for security testing. I tried to do Ajax spider attack on my admin dashboard page. But in the message, out of scope is shown and browser is also not opening. What shall I do to fix this and open browser and to perform this test?
By default ZAP will only follow URLs that are in the same domain, otherwise it could end up trying to spider the whole internet :)
Look at the URLs it is reporting - 'http://detectportal.firefox.com/success.txt' - these are not in the same domain as your app, and are almost certainly not part of it.
So thats not the problem. Which browser and version are you using? Have you checked that ZAP is up to date?
You'll probably get more (and faster) help on the ZAP User Group :) https://groups.google.com/group/zaproxy-users
I tried again by re-installing ZAP. then it worked fine as shown in screenshot. also the webpage is opened in the browser.

Facebook share ignores custom query string parameters

I try to share an URL that contains query parameter in FB.
Here is my share link
Sharing works but my custom query parameter is gone and replaced with facebook query parameters in the facebook timeline something like here
The same problem when FB.ui({ method: 'share',... is used.
It worked well on previous version of facebook sharing sharer.php but it's deprecated now and I have no idea how to make current share work.
We faced same problem. We instead used Feed Dialog that works fine. The irony is that if you read on facebook's developer's site Facebook is recommending us using Share Dialog in place of Feed dialog however, Share dialog does not work as expected.
Here is the link to get more information on Feed dialog
https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.2
Personally i like Feed dialog more the share cause it gives you some additional properties to manage how dialog should appear
i assume you solved your problem in a different way already but i have found a solution for this. Just in case somebody else comes across this question.
Facebook strips the parameters only when it is more or less sure that the file is an php file.
So for http://example.com/?test=1
or http://example.com/index.php?test=1
the parameters are removed.
But if you make it look like a normal html file, it works:
http://example.com/whatever.htm?test=1
for example is posted with the parameters.
Of course you can use some simple mod_rewrite Rule to redirect the request to the original php file:
RewriteRule /whatever.htm(\?.*) /index.php%1
(rule is untested but should work hopefully)

Tumblr share url

I've came across this page https://www.tumblr.com/examples/share/sharing-links-to-articles.html which shows a possible way to customly create a share URL for tumblr.
Simplified version of what they have:
Click to share
http://jsfiddle.net/m5ow6bhs/2/
This will take you to the log in page or straight to the share page if you're already logged in. However, if you change the http%3A%2F%2F part to a simple http:// it will now load to a "Not Found Page". http://jsfiddle.net/m5ow6bhs/3/ What the hell Tumblr?
Do you guys have any idea what's going on or what's the correct code to share something to Tumblr?
Cheers.
As with most share services, the URL should be passed as an encoded string. This supports the OPs comments about http%3A%2F%2F(encoded) and http:// (raw).
Tumblr provides variable transformations in the theme operators to handle encoding, but sadly it doesn't work with custom variables.
One quick solution is to drop the http:// part. Example: http://jsfiddle.net/L9jd8dhz/
I have discovered as of recently that the share URL needs to be updated as such:
https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=<-urlencode(share_url)->&posttype=link
The &posttype= seems to be a new requirement to make the share work correctly.

Dirrect way to get content of current open page into main.js file in FireFox add-on sdk

I have one problem with add-on Firefox sdk. I'm searching a way to get content of current working page into main.js file. The application is based on widget that open popup when is clicked. I have one idea. To inject content script into open with sdk/page-worker and this content script using port API (self.port.emit) to trigger event and pass document.body.innerHTML. Like this:
self.port.emit("getCurrentPageHtml", document.body.innerHTML);
And into main.js file:
popupName.port.on("getCurrentPageHtml", function (receivedHtml) {
// handle received html
});
But will be very good idea if there is some direct API and avoid this communication.
I would appreciate any advice and tips.
Best regards.
I answer my own question for the second time today. Pity. Apparently there is no direct way to do this. So we can listen for panel event with popuVar.port.on. After this we can use:
// must be required tab api
// https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/tabs
tabs.activeTab.url
and use page-worker on this url https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/page-worker. After this content script of this page worker will trigger event to get html of page. Another option is just made request to url of current page.

Facebook open graph tutorial not working correctly and not running without chrome

I was trying the open graph tutorial from Facebook developers site.
http://developers.facebook.com/docs/opengraph/tutorial/
I copied and pasted the code and changed the app ID with mine. Step 2 worked fine, but from step 4 meta tags are not working. I checked the code several times,app ID and "YOUR_NAMESPACE"is changed correctly. I was developing inside localhost of WAMP server. Did I miss anything? I followed every step from the tutorial.
Secondly 'Add to timeline' or 'login' box isn't showing in any browser except chrome. Inside chrome it works fine, but in firefox or IE it shows only a link to Facebook site. Why is that!
And suggest me some good tutorial on open graph.Please Help!
It probably didn't work as it says the object page in Step 4 has to be publicly accessible. Facebook needs to be able to gather data from that page to present in time line. Your localhost mamp install won't be publicly accessible.
From the tutorial >>
Before being able to publish an Open Graph action for a user and having define its
corresponding connected object type in Step 3, you will now need to create a publicly
accessible web page that represents this object using Open Graph metatags. Once this
object page is created, you can use the Graph API to publish an action.
I have not seen any good tutorials on it besides facebook's. They go in depth into every aspect of it as it is their product. I followed that same tutorial and it works perfectly.
Without your code I cant really help. If you put your meta tags up ill have a look.
Im also not sure if it actually works off the local host.