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

switch to https urls in the DS_NPR_API class #44

Merged
merged 8 commits into from Apr 16, 2018

Conversation

Projects
None yet
2 participants
@benlk
Contributor

benlk commented Jan 22, 2018

Changes

(edited)

  • Replaces all http: URLs in the plugin with https: URLs
  • Updates the regular expressions used by DS_NPR_API::load_page_hook to find the story ID
  • Updates the NPRML XML namespace declaration to also use an HTTPS URL: #45
  • Replaces a few outdated NPR links in docs and readmes with correct ones, where the redirect worked in an obvious fashion:
    • Account signup pages
    • Ari Shapiro's bio

Why

From the update document:

With NPR.org going HTTPS, following update needs to be made in the Story API plugin for querying Story content so NPR stories can be queried by HTTPS and HTTP URLs

For INN#11

@benlk

This comment has been minimized.

Contributor

benlk commented Jan 22, 2018

A question before merging: do any of these other references to insecure URLs need to be changed?

./classes/NPRAPI.php:  const NPRAPI_PULL_URL = 'http://api.npr.org';
./classes/NPRAPI.php:  const NPRML_NAMESPACE = 'xmlns:nprml=http://api.npr.org/nprml';
./classes/NPRAPIWordpress.php:   *   The path part of the request URL (i.e., http://example.com/PATH).
./ds-npr-api.php:	$def_url = 'http://api.npr.org';
./get_stories.php:					if ( stristr( $query_string, 'http:' ) ) {
./settings_ui.php:       <div><p>Create an NPR API query (see the <a target="_" href="http://www.npr.org/api/queryGenerator.php">NPR API query generator</a>). Enter your queries into one of the rows below to have stories on that query automatically publish to your site. Please note, you do not need to include your API key to the query.  </div>
./tests/test-ds-npr-api.php:		$this->assertEquals( $option, 'http://api.npr.org' );
@benlk

This comment has been minimized.

Contributor

benlk commented Mar 19, 2018

  • API URLs and associated tests
  • NPRML Namespace: #45
  • doc comments in PHP files
@milespj

This comment has been minimized.

milespj commented Mar 19, 2018

Hi Ben -

All of NPR's website links (including API calls) are generally now HTTPS. In fact if you find any that aren't HTTPS let me know! So, we should update all of the URL's to be HTTPS to eliminate unnecessary redirects.

@benlk

This comment has been minimized.

Contributor

benlk commented Mar 20, 2018

Cool, I'll update this pull request with https urls for all the NPR links, where those links can be updated.

Of note:

benlk added some commits Mar 20, 2018

Upgrade all http: links to https: links, where possible.
Also, replace some broken links where the correct link is obvious. Don't replace broken links where the broken link isn't obvious. See #44 (comment)
@milespj

This comment has been minimized.

milespj commented on README.md in eddaae1 Mar 21, 2018

Should be HTTPS.

@milespj

This comment has been minimized.

milespj commented Mar 21, 2018

Thanks for all of these documentation edits! Other than the one URL that was still marked as HTTP this looks good.

@benlk

This comment has been minimized.

Contributor

benlk commented Mar 23, 2018

That must've happened when I merged f4032ce into this branch; my bad. It's fixed now.

@benlk benlk referenced this pull request Mar 28, 2018

Merged

Revisions to the NPR API editor meta box #47

1 of 3 tasks complete
@milespj

This comment has been minimized.

milespj commented Apr 13, 2018

Just wanted to mention that I'm good with this pull request!

@benlk benlk merged commit 9d3b111 into npr:master Apr 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment