Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 870283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:26:51+00:00 2026-05-15T10:26:51+00:00

Im trying to make an extension to Safari that authenticates with http://myphotodiary.com ‘s API.

  • 0

Im trying to make an extension to Safari that authenticates with http://myphotodiary.com‘s API. And it works well, for all passwords that dont include special characters like:

å,ä,ö and space

I have the following code working now:

var xmlHttp = new XMLHttpRequest();

var url = "https://api.myphotodiary.com/user_status.json?api_key=66217f993f25a8a05dd72970473aa2227450dcad";

var username = "iphone";
var password = "bdbiphone123";

var authy = Base64.encode(username+":"+password);

xmlHttp.open('GET', url, true);
xmlHttp.setRequestHeader("Authorization", "Basic " + authy);
xmlHttp.onreadystatechange = function(){
if (xmlHttp.readyState == 4){
    var data;
    eval("data="+xmlHttp.responseText);
    console.log(data);
}
};
xmlHttp.send(null);

This code works great for all passwords that dont include the special characters, but if i change the login info to

var username = "blpninja";
var password = "./ hejä";

it starts to fail.

This exact code works in Safari, but not when i put it in an extension.

I have also tried the xmlHttpRequest.open built in authentication

xmlHttp.open('GET', url, true, username, password);

with the same result.

This is my head of the global page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>

I get the “Failed to load resource: cancelled” and these are the headers Safari is sending:

Authorization:Basic YmxwbmluamE6Li8gaGVqw6Q=
Content-Type:text/xml; charset=utf-8
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; sv-se) AppleWebKit/533.16 (KHTML, like Gecko)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:26:52+00:00Added an answer on May 15, 2026 at 10:26 am

    Not sure and no time to delve into it, but maybe encoding the strings will help?

    var username = encodeURIComponent("blpninja"), //=> sends: blpninja
        password = encodeURIComponent("./ hejä");  //=> sends: .%2F%20hej%C3%A4
    

    on the server side it may have do be decoded (decodeURIComponent)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make an extension that crashes all tabs in chrome window so
I am trying to make a firefox extension that will list all the videos
I am trying to make a Chrome extension for personal use that makes all
I'm trying to make a safari extension that does something if the cursor focus
I am trying to make a firefox extension which looks at all the new
I'm trying to figure out if it is possible to make an extension that
I am trying to make an extension method that will shuffle the contents of
I'm trying to make an extension method that takes in an expression that points
I am trying to make a google extension that plays music. I want the
I'm trying to make a Chrome extension that will search different cache databases for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.