DealMakerz

Complete British News World

This opens Azure Active Directory to new authentication risks

This opens Azure Active Directory to new authentication risks

It has been widely known for years that local Windows Active Directory networks are vulnerable to so-called NTLM relay (New Technology Lan Manager) and hash pass attacks that can allow attackers to move laterally within networks and gain access to more devices and resources.

Because some of these attacks exploit design trade-offs in the protocols used in Windows networking, they simply cannot be safely fixed with updated software. To protect themselves, organizations need to implement deeper defense and measures that include tighter configurations and more controls.

With the adoption of hybrid networks, where parts of the network are on premises and other parts are in the cloud, companies need to rely on services such as Azure Active Directory (Azure AD) to enable different devices to authenticate with each other. However, Azure AD is quite different compared to on-premises AD because it uses different protocols and comes with new features that extend network capabilities for organizations. But according to several presentations at last year’s Black Hat USA security conference, this also opens up new opportunities for attackers.

From passing hash to passing certificate

Pass-the-hash is an attack where hackers extract hashed versions of locally stored credentials from compromised devices and use them to authenticate to other devices. NTLM relay is a method in which you relay authentication requests between a client and a server and forward messages between the two parties so that the attacker is authenticated instead of the client. Sophisticated hacker groups often use these attack methods in targeted attacks.

However, traditional hash and paging pass-through attacks will not work against Azure AD because Azure AD does not use NTLM or Kerberos – the default protocols used when authenticating on Windows networks – but Azure AD uses OAuth, SAML, OpenID and a new protocol called NegoEx which in turn is an extension of the protocol Unified Common Security Services Application Program Interface (GSSAPI) on which Kerberos relies.

According to Microsoft researcher Mor Rubin, NagoEx will be enabled on all Azure AD connected devices and is the mechanism by which different Azure AD connected devices authenticate each other. The authentication handshake in NegoEx is based on a client certificate that is unique to each user and is issued by Azure AD with a one-hour validity.

See also  How to turn off the sound in Facebook messages

During the Black Hat conference, Rubin showed how a relay attack could be performed against a NegoEx handshake in a similar way as it could be done against NTLM. Then show how an attacker can obtain a peer-to-peer client certificate and then use that certificate to authenticate to other devices. In other words, these attacks are equivalent to NTLM, paging, and hash-pass attacks, but in the context of Azure AD-bound devices regardless of the differences in the protocols used.

Rubin suggests that companies check the logs on their Azure AD devices for authentication requests from clients whose names and IP addresses do not match, or for authentication requests via certificates issued to users not associated with the device making the request. Rubin’s presentation was the culmination of research he began last year and was also the first demonstration of the tool negoexrelayxwhich is a migration tool for NegoEx under an open source license.

Leverage external identities in Azure AD

In another presentation during a Black Hat conference focused on specific Azure AD attacks not found on on-premises AD facilities, Dutch researcher Dirk-Jan Mollema of Outsider Security explained how he I found a way to exploit the feature with external identities To create a backdoor for Azure AD accounts.

External identities are a feature of Azure AD that organizations can use to grant external users access to certain resources. These users may belong to a different part of Azure AD or they may be authenticated by an external provider and identified only by an email address. This feature is popular among organizations that work with third-party consultants but also provides access to IT service providers who manage subscriptions.

External users can be invited by someone with admin rights through the Azure AD interface and this creates an invite link that is emailed to the external user. Mollema found that the problem was that invitations could be created and accepted programmatically through the Azure AD API called AAD Graph.

See also  For sale: Fluid resistant trainer and lots of accessories

It also appears that not many checks are made when interacting with this function through the API. First, any user within the Azure AD department can query the API and see which invitations have not yet been retrieved, and second, any invitation can be retrieved through the API without any validation and can be associated with a different external account than the intended one. Third, the administrators had no way of determining whether the invitation was compromised through the interface.

The attack was also able to circumvent the list of allowed domains for external collaboration in the Azure AD department because the invitation could be created for an email address within a domain, but then it was hijacked and associated with an account that wasn’t on the list. As an added bonus, there may be automatic rules that automatically award an account that redeems a higher privilege level invitation, resulting in privilege escalation.

Mollema then took the attack a step further. By analyzing how external identities appear in the Microsoft Graph – an API for developers – rather than the AAD Graph, Mollema realized that some properties associated with the identity could be modified through the MS Graph, given the correct privileges. One such attribute is a Publisher property that specifies the Identity Provider, and one of the options was simply “Email”. This is for external users who are identified only by their email address and do not have a Microsoft account or Azure AD.

Mollema then looked at who can modify these attributes and found that in addition to administrators, applications that users log in to, that have the appropriate privileges, can modify identities, and users can also modify their identities through MS Graph. This opened the door to interesting attacks, such as placing backdoors into existing accounts if the attacker gains temporary access to them by stealing an access token, or by gaining temporary control of a computer where the user has an active session.

In addition, if the account is the user’s administrator, attackers can create backdoors to all accounts by adding external identities to them and associating them with email addresses controlled by the attackers. They can also do this for global admins as they have rights to modify their identities through MS Graph.

See also  Charles "Mario" Martinet doesn't know what his role as Mario's ambassador entails

The downside to modifying the identity this way is that it only changes the basic authentication method from username and password to authentication via an external email address. If the account is also secured with multi-factor authentication, the attacker still won’t be able to log in.

But Mollema found a way around this, too. First, use the victim’s temporarily compromised account to create an invitation to the attacker’s external account. The attacker then accepted the invitation, which created a guest account for the attacker in the victim section. Then the attacker logs in with the guest account and configures multi-factor authentication for that account.

The attacker then deleted the guest account using the victim’s account. Since this deletes the guest account associated with the attacker’s external account, it does not clear the account’s multi-factor token, but remains in the buffer. So the attacker’s external account continues to have an active token in the victim’s Azure AD partition even if the associated guest account disappears. The attacker can then create a backdoor to the victim’s account and add their account as an identity, after which the attacker will no longer need to authenticate using MFA. This completes the multifactorial protection of the victim.

How to mitigate cloud authentication vulnerabilities in Azure AD and more

Microsoft has already created updates against the vulnerabilities Mollema discovered, so the attacks he described no longer work. But his findings show the complexity of authentication in new cloud environments. Introducing new features, such as allowing one-time passwords for each email as an identity provider or external identities, can always lead to logical errors that can open shortcuts.

Mollema advises organizations to regularly delete all guest accounts with unrefunded invitations, to secure the right to create guest invitations and guest rights settings, restrict which sections of Azure AD can collaborate externally, implement multi-factor authentication for all applications, and inspect access logs for signs of possible use of guest accounts.

Anpassa dina inställningar

För att kunna visa innehållet behöver vi ditt godkännande. Om du inte fått möjlighet att godkänna kan det bero på ett tillfälligt fel hos oss eller att ett plugin till din webbläsare blockerar vår förfrågan.

Ladda om sidan eller inaktivera eventuella plugin i din webbläsare för att göra ditt val.

Du kan välja bort alla funktioner där din webbläsares aktivitet kan lagras för att direkt eller indirekt ge dig personligt anpassade annonser.

";info.appendChild(text);}}function loadHtmlContent(element){var consent=localStorage.getItem(window.IDG_CONSENT.storage.name);if((consent==window.IDG_CONSENT.storage.value.granted||(window.IDG_CONFIGURATION.consent_disable_modal&&consent==window.IDG_CONSENT.storage.value.limbo))&&!hasClass(element,configuration_status.lazy.html.approved)){var elementType=element.getAttribute("data-lazy-type");var lazyLoaded=document.createElement(elementType);if(element.getAttribute("style")!=null){element.removeAttribute("style");}for(var i=0;i-1){href=decodeURIComponent(param.replace("href="https://computersweden.idg.se/2.2683/1.774988/,""));break;}}var likeLink=document.createElement("a");likeLink.setAttribute("target"https://computersweden.idg.se/2.2683/1.774988/,"_blank");likeLink.setAttribute("rel"https://computersweden.idg.se/2.2683/1.774988/,"noopener");likeLink.setAttribute("href",href);likeLink.innerHTML="Gilla";element.appendChild(likeLink);}else{var consentInformation=element.getAttribute("data-lazy-consent-info");var consentActionText=element.getAttribute("data-lazy-consent-customize");if(element.getAttribute("data-placeholder-state")!=="init"){initHtmlContentPlaceHolder(element);}var info=element.querySelectorAll(".consent-information")[0];info.innerHTML="";var text=document.createElement("div");text.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"consent-text");text.innerHTML=consentInformation;info.appendChild(text);var button=document.createElement("div");button.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"consent-button");button.innerHTML=consentActionText;info.appendChild(button);var consentInfoWrapper=element.querySelectorAll(".consent-information-container")[0];consentInfoWrapper.addEventListener("click",function(){document.dispatchEvent(new CustomEvent(window.IDG_CONFIGURATION.event.open.name,{response:"open consent modal"}));},false);consentInfoWrapper.appendChild(info);element.appendChild(consentInfoWrapper);}removeClass(element,configuration_status.lazy.html.approved);addClass(element,configuration_status.lazy.html.dissaproved);}}}function loadHTBContent(element){var source=element.getAttribute("data-source");if(source!==null&&source!==""){var articleTeaserWrapper=element.querySelector(".htb__inner");if(typeof articleTeaserWrapper!=="undefined"&&articleTeaserWrapper!==null){addClass(element,"loading");var htbXhr=new XMLHttpRequest();htbXhr.open("GET",source);htbXhr.crossDomain=true;htbXhr.onload=function(){try{var response=JSON.parse(htbXhr.responseText);var hasArticles=false;if(typeof response.articles!=="undefined"){for(var i in response.articles){if(response.articles.hasOwnProperty(i)){hasArticles=true;var article=response.articles[i];var articleElement=document.createElement("article");articleElement.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"htb__item");var articleLink=document.createElement("a");if(typeof article.topTeaserImageUrl!=="undefined"&&article.topTeaserImageUrl!==null&&article.topTeaserImageUrl.length>0){articleLink.setAttribute("style"https://computersweden.idg.se/2.2683/1.774988/,"background-image: url("+article.topTeaserImageUrl+")");}else{if(typeof article.teaserImageUrl!=="undefined"&&article.teaserImageUrl!==null&&article.teaserImageUrl.length>0){articleLink.setAttribute("style"https://computersweden.idg.se/2.2683/1.774988/,"background-image: url("+article.teaserImageUrl+")");}}articleLink.setAttribute("href",article.articleLink);articleLink.setAttribute("title",article.teaserTitle);var articleTitle=document.createElement("h3");articleTitle.innerHTML=article.teaserTitle;articleLink.appendChild(articleTitle);articleElement.appendChild(articleLink);var articleSkeleton=articleTeaserWrapper.querySelector(".htb__article-skeleton");if(typeof articleSkeleton!=="undefined"&&articleSkeleton!==null){articleSkeleton.replaceWith(articleElement);}else{articleTeaserWrapper.appendChild(articleElement);}}}}if(hasArticles){var footerWrapper=element.querySelector(".htb__footer");if(typeof footerWrapper!=="undefined"&&footerWrapper!==null&&hasClass(footerWrapper,"wwu-buttons")){var clickSettings={category:"Page Links",action:"To: ",label:"From: "+(window.dataLayer[0].headline.length>0?window.dataLayer[0].headline:window.dataLayer[0].property)+" → "+window.dataLayer[0].property+" → "+window.dataLayer[0].contentId};var returnurl="";var url=null;var canonicalUrl=document.querySelector("link[rel="canonical"]");if(typeof canonicalUrl!=="undefined"&&canonicalUrl!==null){url=canonicalUrl.getAttribute("href");if(!(typeof url!=="undefined"&&url!==null&&url.length>0&&url.indexOf(window.dataLayer[0].property)>-1)){url=null;}}if(url===null){var ogUrl=document.querySelector("meta[property='og:url']");if(typeof ogUrl!=="undefined"&&ogUrl!==null){url=ogUrl.getAttribute("content");}}if(typeof url!=="undefined"&&url!==null&&url.length>0){try{returnurl+="?return=";returnurl+=encodeURIComponent(url);}catch(err){returnurl="";}}var packageName="";var upgradeUrl=window.IDG_CONFIGURATION.account.page+window.IDG_CONFIGURATION.account.path_o;if(window.dataLayer[0].audience==="consumer"){upgradeUrl+=window.IDG_CONFIGURATION.account.path_o_consumer;packageName=window.IDG_CONFIGURATION.account.package_name_consumer+"-";}else{if(window.dataLayer[0].audience==="enterprise"){upgradeUrl+=window.IDG_CONFIGURATION.account.path_o_enterprise;packageName=window.IDG_CONFIGURATION.account.package_name_enterprise+"-";}}var upgradeTrUrl=upgradeUrl;upgradeUrl+=returnurl;if(window.dataLayer[0].view!=="in-app-ios"&&window.dataLayer[0].audience!=="consumer"){var upgradeLink=document.createElement("a");upgradeLink.setAttribute("href",upgradeUrl);upgradeLink.setAttribute("title"https://computersweden.idg.se/2.2683/1.774988/,"Bli "+packageName+"medlem");upgradeLink.innerHTML='";upgradeLink.addEventListener("click",function(e){if(typeof IDGTrackEvent!=="undefined"){IDGTrackEvent(clickSettings.category,clickSettings.action+upgradeTrUrl,clickSettings.label);}});footerWrapper.appendChild(upgradeLink);}var loginLink=document.createElement("a");loginLink.setAttribute("href",window.IDG_CONFIGURATION.account.page+window.IDG_CONFIGURATION.account.path_si+returnurl);loginLink.setAttribute("title"https://computersweden.idg.se/2.2683/1.774988/,"Logga in");loginLink.innerHTML='';loginLink.addEventListener("click",function(e){if(typeof IDGTrackEvent!=="undefined"){IDGTrackEvent(clickSettings.category,clickSettings.action+window.IDG_CONFIGURATION.account.page+window.IDG_CONFIGURATION.account.path_si,clickSettings.label);}});footerWrapper.appendChild(loginLink);}removeClass(element,"loading");addClass(element,"loaded");}else{addClass(element,"failed--empty");}}catch(error){addClass(element,"failed-js");}};htbXhr.onerror=function(e){addClass(element,"failed-xhr");};htbXhr.send(null);}else{addClass(element,"failed--missing-wrapper");}}else{addClass(element,"failed--missing-source");}}function initiateFacebookPixel(){if(typeof window.IDG_CONFIGURATION.facebook_pixel!=="undefined"&&window.IDG_CONFIGURATION.facebook_pixel.enabled){!function(f,b,e,v,n,t,s){if(f.fbq){return;}n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments);};if(!f._fbq){f._fbq=n;}n.push=n;n.loaded=!0;n.version="2.0";n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s);}(window,document,"script",window.IDG_CONFIGURATION.facebook_pixel.source);for(var i in window.IDG_CONFIGURATION.facebook_pixel.ids){var id=window.IDG_CONFIGURATION.facebook_pixel.ids[i];if(id!=""){fbq("init",id);fbq("track"https://computersweden.idg.se/2.2683/1.774988/,"PageView");fbq("track"https://computersweden.idg.se/2.2683/1.774988/,"ViewContent");}}}}function initiateComscore(){var _comscore=_comscore||[];_comscore.push({c1:"2",c2:"6035308"}),function(){var a=document.createElement("script"),b=document.getElementsByTagName("script")[0];a.async=!0,a.src="https://sb.scorecardresearch.com/beacon.js",b.parentNode.insertBefore(a,b);}();}function initiatePermutive(){try{window.IDG_CONFIGURATION.permutive.debug=(window.location.href.indexOf("permutivedebug=true")>-1);}catch(err){window.IDG_CONFIGURATION.permutive.debug=false;window.IDG_CONFIGURATION.permutive.debug_error=err.message;}if(window.IDG_CONFIGURATION.permutive.debug){console.log("DEBUG Permutive enabled",window.IDG_CONFIGURATION.permutive.enabled);}if(window.IDG_CONFIGURATION.permutive.enabled){!function(n,e,o,r,i){if(!e){e=e||{},window.permutive=e,e.q=[],e.config=i||{},e.config.projectId=o,e.config.apiKey=r,e.config.environment=e.config.environment||"production";for(var t=["addon"https://computersweden.idg.se/2.2683/1.774988/,"identify"https://computersweden.idg.se/2.2683/1.774988/,"track"https://computersweden.idg.se/2.2683/1.774988/,"trigger"https://computersweden.idg.se/2.2683/1.774988/,"query"https://computersweden.idg.se/2.2683/1.774988/,"segment"https://computersweden.idg.se/2.2683/1.774988/,"segments"https://computersweden.idg.se/2.2683/1.774988/,"ready"https://computersweden.idg.se/2.2683/1.774988/,"on"https://computersweden.idg.se/2.2683/1.774988/,"once"https://computersweden.idg.se/2.2683/1.774988/,"user"https://computersweden.idg.se/2.2683/1.774988/,"consent"],c=0;c0){return date.replace(" "https://computersweden.idg.se/2.2683/1.774988/,"T")+":00Z";}return null;}function appendPermutiveAddon(pageDataLayer){var appendAddon=(window.IDG_CONFIGURATION.permutive.enabled&&typeof pageDataLayer!=="undefined"&&pageDataLayer!==null);if(window.IDG_CONFIGURATION.permutive.debug){console.log("DEBUG Permutive appendAddon",appendAddon);}if(appendAddon){var page={type:pageDataLayer.displayType,language:dataLayer[0].propertyCountry,tags:[],keywords:pageDataLayer.metaKeywords,audience:pageDataLayer.audience,description:pageDataLayer.metaDescription,gTax:{primaryIds:[],secondaryIds:[],},ads:{enabled:window.IDG_CONFIGURATION.ads.enabled}};if(typeof pageDataLayer.primaryChannel!=="undefined"&&pageDataLayer.primaryChannel.length>0){page.tags.push(pageDataLayer.primaryChannel);if(typeof window.IDG_CONFIGURATION.permutive.mapping[pageDataLayer.primaryChannel]!=="undefined"){page.gTax.primaryIds.push(window.IDG_CONFIGURATION.permutive.mapping[pageDataLayer.primaryChannel]);}}if(typeof pageDataLayer.secondaryChannels!=="undefined"&&pageDataLayer.secondaryChannels.length>0){for(var i in pageDataLayer.secondaryChannels){var current=pageDataLayer.secondaryChannels[i];page.tags.push(current);if(typeof window.IDG_CONFIGURATION.permutive.mapping[current]!=="undefined"){page.gTax.secondaryIds.push(window.IDG_CONFIGURATION.permutive.mapping[current]);}}}if(pageDataLayer.contentType==="home page"){page.type=pageDataLayer.contentType;}else{if(pageDataLayer.displayType==="article"){var article={type:pageDataLayer.contentType,title:pageDataLayer.headline,description:pageDataLayer.description,source:pageDataLayer.source,id:pageDataLayer.articleId,modifiedAt:formatPermutiveDate(pageDataLayer.dateUpdated),publishedAt:formatPermutiveDate(pageDataLayer.datePublished),authors:pageDataLayer.authors,isInsiderContent:(pageDataLayer.locked==="true")?true:false};page.article=article;}}permutive.addon("web",{page:page});if(window.IDG_CONFIGURATION.permutive.debug){console.log("DEBUG Permutive page",page);}}}function insertHeadFullScript(){if(typeof window.IDG_CONFIGURATION.auth!=="undefined"&&window.IDG_CONFIGURATION.auth.state==="ready"&&window.IDG_CONFIGURATION.async_sources.enabled&&typeof window.IDG_CONFIGURATION.async_sources.full.head!=="undefined"){if(window.IDG_CONFIGURATION.async_sources.full.head.source!=""){appendAsyncJSTag(window.IDG_CONFIGURATION.async_sources.full.head.source);}if(window.dataLayer[0].subscriber&&window.IDG_CONFIGURATION.async_sources.full.head.auth!=""){appendAsyncJSTag(window.IDG_CONFIGURATION.async_sources.full.head.auth);}if(!window.dataLayer[0].subscriber&&window.IDG_CONFIGURATION.async_sources.full.head.unauth!=""){appendAsyncJSTag(window.IDG_CONFIGURATION.async_sources.full.head.unauth);}}}function insertHeadLightScript(){if(typeof window.IDG_CONFIGURATION.auth!=="undefined"&&window.IDG_CONFIGURATION.auth.state==="ready"&&window.IDG_CONFIGURATION.async_sources.enabled&&typeof window.IDG_CONFIGURATION.async_sources.light.head!=="undefined"){if(window.IDG_CONFIGURATION.async_sources.light.head.source!=""){appendAsyncJSTag(window.IDG_CONFIGURATION.async_sources.light.head.source);}if(window.dataLayer[0].subscriber&&window.IDG_CONFIGURATION.async_sources.light.head.auth!=""){appendAsyncJSTag(window.IDG_CONFIGURATION.async_sources.light.head.auth);}if(!window.dataLayer[0].subscriber&&window.IDG_CONFIGURATION.async_sources.light.head.unauth!=""){appendAsyncJSTag(window.IDG_CONFIGURATION.async_sources.light.head.unauth);}}}function insertFooterFullScript(){if(typeof window.IDG_CONFIGURATION.auth!=="undefined"&&window.IDG_CONFIGURATION.auth.state==="ready"&&window.IDG_CONFIGURATION.async_sources.enabled&&typeof window.IDG_CONFIGURATION.async_sources.full.footer!=="undefined"){if(window.IDG_CONFIGURATION.async_sources.full.footer.source!=""){appendAsyncJSTagToBody(window.IDG_CONFIGURATION.async_sources.full.footer.source);}if(window.dataLayer[0].subscriber&&window.IDG_CONFIGURATION.async_sources.full.footer.auth!=""){appendAsyncJSTag(window.IDG_CONFIGURATION.async_sources.full.footer.auth);}if(!window.dataLayer[0].subscriber&&window.IDG_CONFIGURATION.async_sources.full.footer.unauth!=""){appendAsyncJSTag(window.IDG_CONFIGURATION.async_sources.full.footer.unauth);}}else{window.IDG_CONFIGURATION.async_sources.full.footer.waiting=true;}}function insertFooterLightScript(){if(typeof window.IDG_CONFIGURATION.auth!=="undefined"&&window.IDG_CONFIGURATION.auth.state==="ready"&&window.IDG_CONFIGURATION.async_sources.enabled&&typeof window.IDG_CONFIGURATION.async_sources.light.footer!=="undefined"){if(window.IDG_CONFIGURATION.async_sources.light.footer.source!=""){appendAsyncJSTagToBody(window.IDG_CONFIGURATION.async_sources.light.footer.source);}if(window.dataLayer[0].subscriber&&window.IDG_CONFIGURATION.async_sources.light.footer.auth!=""){appendAsyncJSTag(window.IDG_CONFIGURATION.async_sources.light.footer.auth);}if(!window.dataLayer[0].subscriber&&window.IDG_CONFIGURATION.async_sources.light.footer.unauth!=""){appendAsyncJSTag(window.IDG_CONFIGURATION.async_sources.light.footer.unauth);}}else{window.IDG_CONFIGURATION.async_sources.light.footer.waiting=true;}}function insertSponsoredPixel(articleElement){if(typeof articleElement!=="undefined"&&articleElement!=null){if(hasClass(articleElement,"sparticle")&&!hasClass(articleElement,"sptarticle")){updateSponsorTracking(articleElement,articleElement.getAttribute("data-article-sp-dcui"),articleElement.getAttribute("data-article-sp-dcseg"),articleElement.getAttribute("data-article-sp-iframe-name"),articleElement.getAttribute("data-article-sp-iframe-src"));}}}function loadTTDFrames(element){var ttdFrames=element.querySelectorAll(".ttd-frame");var ttdFramesSize=ttdFrames.length;for(var i=0;i0&&typeof configuration_status.vibrant[name]!=="undefined"){var id=configuration_status.vibrant[name];(function(d,s,host,ipid){var e=d.createElement(s);e.type="application/javascript";e.async=!0;e.src="https://"+host+"/intellitxt/front.asp?ipid="+ipid;d.getElementsByTagName(s)[0].parentNode.appendChild(e);})(document,"script"https://computersweden.idg.se/2.2683/1.774988/,"k.intellitxt.com",id);}}}var pbjs=pbjs||{};pbjs.que=pbjs.que||[];var googletag=googletag||{};googletag.cmd=googletag.cmd||[];if(configuration_status.ab_test.enable){var group=localStorage.getItem(configuration_status.ab_test.name);if(configuration_status.ab_test.activate.indexOf(group)>-1&&typeof configuration_status.ab_test.modal.matching_config[group]!=="undefined"){var currentConfig=configuration_status.ab_test.modal.matching_config[group];window.IDG_CONFIGURATION.consent_disable_modal=currentConfig.consent_disable_modal;}else{window.IDG_CONFIGURATION.consent_disable_modal=configuration_status.ab_test.modal.none_matching_value.consent_disable_modal;}}else{window.IDG_CONFIGURATION.consent_disable_modal=configuration_status.ab_test.modal.default_value.consent_disable_modal;}if(window.IDG_CONFIGURATION.consent_disable_modal){document.addEventListener(window.IDG_CONFIGURATION.event.limbo.name,function(e){window.IDG_CONFIGURATION.event.limbo.dispatched=true;initiateConsentDependenciesHead();});}window.IDG_CONFIGURATION.consent_response_box={enable:true};if(window.location.hostname==="idgsverige.se"){window.IDG_CONFIGURATION.consent_domain="idgsverige.se";}window.IDG_CONFIGURATION.consent_state_ready="init";setTimeout(function(){window.IDG_CONFIGURATION.consent_state_ready=false;if(!window.IDG_CONFIGURATION.consent_state_ready){var waitingHtmlTargets=document.querySelectorAll("."+configuration_status.lazy.html.waiting);for(var i in waitingHtmlTargets){var target=waitingHtmlTargets[i];if(typeof target==="object"){loadHtmlWaiting(target);}}}},configuration_status.consent_timeout);document.addEventListener(window.IDG_CONFIGURATION.event.stored.name,function(e){window.IDG_CONFIGURATION.event.stored.dispatched=true;window.IDG_CONFIGURATION.event.stored.value=localStorage.getItem(window.IDG_CONSENT.storage.name);initiateConsentDependenciesHead();});document.addEventListener(window.IDG_CONFIGURATION.event.action.name,function(e){window.IDG_CONFIGURATION.event.action.dispatched=true;initiateConsentDependencies();});document.addEventListener(window.IDG_CONFIGURATION.event.response.name,function(e){window.IDG_CONFIGURATION.event.response.dispatched=true;});document.addEventListener("lazybeforeunveil",function(e){var lazyTarget=e.target;var classNames=lazyTarget.getAttribute("class");if(typeof classNames!=="undefined"&&classNames!==null){if(hasClass(lazyTarget,"lazy-ad-container")||hasClass(lazyTarget,"ads-container")){if(typeof window.IDG_CONFIGURATION!=="undefined"&&window.IDG_CONFIGURATION.ads.status===configuration_status.done){loadNewPageAds(lazyTarget,lazyTarget.getAttribute("data-page"),lazyTarget.getAttribute("data-selector"));}else{addClass(lazyTarget,configuration_status.lazy.ad.waiting);}}else{if(hasClass(lazyTarget,"lazy-html-container")){if(window.IDG_CONFIGURATION.event.stored.dispatched||(window.IDG_CONFIGURATION.consent_disable_modal&&window.IDG_CONFIGURATION.event.limbo.dispatched)||window.IDG_CONFIGURATION.event.action.dispatched){loadHtmlContent(lazyTarget);}else{loadHtmlWaiting(lazyTarget);}}else{if(hasClass(lazyTarget,"lazy-htb")){loadHTBContent(lazyTarget);}}}}if(configuration_status.custom_lazy_event.active){setTimeout(function(){document.dispatchEvent(new CustomEvent(configuration_status.custom_lazy_event.name,{detail:{target:lazyTarget}}));},100);}});if(typeof window.NSPT!=="undefined"){var nsptId=getUrlParameter("prx_t");if(nsptId.length<=0){var parts=location.href.replace(location.search,"").split("partner/");if(parts.length>1){nsptId=parts[1].replace(/\/|\s/g,"");}}if(nsptId.length<=0){nsptId="nspt";}var nsptSource=window.NSPT.d;nsptSource+="/";nsptSource+=window.NSPT.g;nsptSource+="/";nsptSource+=nsptId;nsptSource+="/pis.gif";var nsptPixel=document.createElement("img");nsptPixel.src=nsptSource;nsptPixel.width=1;nsptPixel.height=1;nsptPixel.style="display:none;";nsptPixel.onload=function(){aiOnLoad();};if(typeof document.body==="undefined"||document.body===null){document.documentElement.appendChild(nsptPixel);}else{nsptPixel,document.body.appendChild(nsptPixel);}}function articleBodyReady(articleIndex,articlePageClass,articleId,isSponsored){var articleBodyReadyIdentifier=articlePageClass+"_"+articleId;if(!(configuration_status.articleBodyReady.indexOf(articleBodyReadyIdentifier)>-1)){if(articleIndex==1){window.firstarticlebodyloaded=true;}configuration_status.articleBodyReady.push(articleBodyReadyIdentifier);document.dispatchEvent(new CustomEvent("articlebodyloaded",{detail:{articleIdNo:articleIndex,articleClass:articlePageClass,articleId:articleId,articleSponsored:isSponsored}}));if(typeof window.IDG_CONFIGURATION.auth&&typeof window.IDG_CONFIGURATION.auth.user!=="undefined"&&typeof window.IDG_CONFIGURATION.auth.user.saved_articles!=="undefined"&&window.IDG_CONFIGURATION.auth.user.saved_articles.length>0){for(var i in window.IDG_CONFIGURATION.auth.user.saved_articles){var articleElement=document.querySelector(".page-"+articleIndex);if(articleElement!==null){if(window.IDG_CONFIGURATION.auth.user.saved_articles[i].article_id===articleElement.getAttribute("data-article-id")){if(!hasClass(articleElement,"article--bookmarked")){addClass(articleElement,"article--bookmarked");}}}}}}}function unauthFeatureLayer(config){var currentLayer=window.dataLayer[0];var parentElement=null;if(typeof config.id!=="undefined"){parentElement=document.querySelector('div[data-article-id="'+config.id+'"]');for(var i in window.dataLayer){if(typeof window.dataLayer[i]!=="function"&&typeof window.dataLayer[i].articleId!=="undefined"&&window.dataLayer[i].articleId===config.id){currentLayer=window.dataLayer[i];break;}}}if(parentElement===null){parentElement=document;}var clickSettings={category:"Paywall Layer",label:"From: "+(typeof currentLayer.headline!=="undefined"&¤tLayer.headline.length>0?currentLayer.headline:currentLayer.property)+" → "+config.layer_class+" → "+currentLayer.property+" → "+currentLayer.contentId,action:"To: "};var layer=parentElement.querySelector("."+config.layer_class);if(layer===null){var userExists=(typeof window.IDG_CONFIGURATION.auth!=="undefined"&&typeof window.IDG_CONFIGURATION.auth.user!=="undefined");var returnurl="";if(typeof config.url!=="undefined"&&config.url!==null){try{returnurl+="?return=";var currenturl=config.url;if(currenturl.indexOf("http://")>-1){currenturl=currenturl.replace("http://"https://computersweden.idg.se/2.2683/1.774988/,"https://");}returnurl+=encodeURIComponent(currenturl);}catch(err){returnurl="";}}var packageName="";var upgradeUrl=window.IDG_CONFIGURATION.account.page+window.IDG_CONFIGURATION.account.path_o;if(window.dataLayer[0].audience==="consumer"){upgradeUrl+=window.IDG_CONFIGURATION.account.path_o_consumer;packageName=window.IDG_CONFIGURATION.account.package_name_consumer+"-";}else{if(window.dataLayer[0].audience==="enterprise"){upgradeUrl+=window.IDG_CONFIGURATION.account.path_o_enterprise;packageName=window.IDG_CONFIGURATION.account.package_name_enterprise+"-";}}var upgradeTrUrl=upgradeUrl;upgradeUrl+=returnurl;var wrapper=document.createElement("div");wrapper.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"wwu "+config.layer_class+" visible");var headline=document.createElement("h5");headline.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"wwu__head");if(window.dataLayer[0].view==="in-app-ios"){headline.innerHTML=(userExists?config.view_headline.existing_user:config.view_headline.new_user).replace(/{packageName}/g,packageName);}else{headline.innerHTML=(userExists?config.headline.existing_user:config.headline.new_user).replace(/{packageName}/g,packageName);}wrapper.appendChild(headline);var info=document.createElement("div");info.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"wwu__lead");if(window.dataLayer[0].view==="in-app-ios"){info.innerHTML=(userExists?config.view_lead.existing_user:config.view_lead.new_user).replace(/{packageName}/g,packageName);}else{info.innerHTML=(userExists?config.lead.existing_user:config.lead.new_user).replace(/{packageName}/g,packageName);}wrapper.appendChild(info);if(!userExists){var loginLink=document.createElement("a");loginLink.setAttribute("href",window.IDG_CONFIGURATION.account.page+window.IDG_CONFIGURATION.account.path_si+returnurl);loginLink.setAttribute("title"https://computersweden.idg.se/2.2683/1.774988/,"Logga in");loginLink.innerHTML='';loginLink.addEventListener("click",function(e){if(typeof IDGTrackEvent!=="undefined"){IDGTrackEvent(clickSettings.category,clickSettings.action+window.IDG_CONFIGURATION.account.page+window.IDG_CONFIGURATION.account.path_si,clickSettings.label);}});wrapper.appendChild(loginLink);}if(window.dataLayer[0].view!=="in-app-ios"&&window.dataLayer[0].audience!=="consumer"){var upgradeLink=document.createElement("a");upgradeLink.setAttribute("href",upgradeUrl);upgradeLink.setAttribute("title"https://computersweden.idg.se/2.2683/1.774988/,"Bli "+packageName+"medlem");upgradeLink.innerHTML='";upgradeLink.addEventListener("click",function(e){if(typeof IDGTrackEvent!=="undefined"){IDGTrackEvent(clickSettings.category,clickSettings.action+upgradeTrUrl,clickSettings.label);}});wrapper.appendChild(upgradeLink);}var closeWrapper=document.createElement("div");closeWrapper.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"wwu__close");closeWrapper.innerHTML='';closeWrapper.addEventListener("click",function(e){var parent=findParentByClass(e.target,config.layer_class);if(parent!==null){removeClass(parent,"visible");hide(parentElement.querySelector("div.wwu__overlay"));if(typeof IDGTrackEvent!=="undefined"){IDGTrackEvent(clickSettings.category,clickSettings.action+config.layer_class+" toggle collapse",clickSettings.label);}}});wrapper.appendChild(closeWrapper);var overlay=document.createElement("div");overlay.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"wwu__overlay");parentElement.appendChild(overlay);parentElement.appendChild(wrapper);}else{if(!hasClass(layer,"visible")){show(parentElement.querySelector("div.wwu__overlay"));addClass(layer,"visible");}}if(typeof IDGTrackEvent!=="undefined"){IDGTrackEvent(clickSettings.category,clickSettings.action+config.layer_class+" toggle expand",clickSettings.label);}}function unhandledLockedError(lockedId,lockedPageNumber,lockedUrl,errorMessage,trace,lockedXhr,identifier){var errorBox=prepareLockedErrorInfo(lockedId,lockedUrl,null,errorMessage,trace,lockedXhr,identifier);renderLockedErrorInfo(lockedPageNumber,errorBox);}function renderLockedErrorInfo(pageNumber,errorBox){try{if(typeof pageNumber!=="undefined"&&typeof errorBox!=="undefined"&&errorBox!==null){var articleElement=document.getElementsByClassName("page-"+pageNumber)[0];if(typeof articleElement!=="undefined"){var lockedColumn=articleElement.getElementsByClassName("divColumn1Article");if(typeof lockedColumn!=="undefined"&&lockedColumn.length>0){lockedColumn[0].replaceWith(errorBox);}else{window.lockedArticleBody=errorBox;}}else{window.lockedArticleBody=errorBox;}}}catch(error){window.IDG_CONFIGURATION.auth.error.push({message:"Error renderLockedErrorInfo "+error.message});}}function accountError(id,accountUrl,lockedHtml,errorMessage,trace,xhrResponse,identifier){var error={account_url:accountUrl,message:"Failed to load account response",};if(typeof id!=="undefined"){error.article=id;}if(typeof errorMessage!=="undefined"&&errorMessage!==null){error.message+=" error: ";error.message+=errorMessage;}if(typeof trace!=="undefined"&&trace!==null){var tracktrace=null;try{tracktrace=trace.replace(/\n/g," ").replace(/\s+/g," ");}catch(err){}if(tracktrace!==null){error.message+=" trace: ";error.message+=tracktrace;}}else{if(typeof identifier!=="undefined"&&identifier!==null){error.message+=" identifier: ";error.message+=identifier;}}if(typeof lockedHtml!=="undefined"&&lockedHtml!==null){try{var errorMessage=lockedHtml.getAttribute("data-error-message");if(typeof errorMessage!=="undefined"&&errorMessage!==null){error.message+=" html error: ";error.message+=errorMessage;}else{var text=lockedResponse.innerText;if(typeof text!=="undefined"&&text!==null){error.message+=" html error: ";error.message+=text;}}}catch(e){}}if(typeof xhrResponse!=="undefined"&&xhrResponse!==null){try{if(typeof xhrResponse.status!=="undefined"){error.code=xhrResponse.status;}if(typeof xhrResponse.statusText!=="undefined"){error.status=xhrResponse.statusText;}if(typeof xhrResponse.responseText!=="undefined"&&xhrResponse.responseText.startsWith("{")){var response=JSON.parse(xhrResponse.responseText);if(typeof response.message!=="undefined"&&error.message.indexOf(response.message)<0){error.message+=" response error: ";error.message+=response.message;}if(typeof response.status_text!=="undefined"){error.message+=" response status_text: ";error.message+=response.status_text;}if(typeof response.status_code!=="undefined"){error.message+=" response status_code: ";error.message+=response.status_code;}}}catch(e){}}try{error.location=location.href;if(error.location.indexOf("?")>-1){error.location=error.location.substr(0,error.location.indexOf("?"));}}catch(e){}window.IDG_CONFIGURATION.auth.error.push(error);try{if(typeof error.article!=="undefined"&&error.article!==null&&error.article.length>0){var errorUrl=window.IDG_CONFIGURATION.account.source;errorUrl+="/error/log";errorUrl+="?";if(typeof error.status!=="undefined"){errorUrl+="status=";errorUrl+=encodeURIComponent(error.status);}if(typeof error.code!=="undefined"){errorUrl+="&code=";errorUrl+=encodeURIComponent(error.code);}if(typeof error.message!=="undefined"){errorUrl+="&message=";errorUrl+=encodeURIComponent(error.message);}if(typeof error.location!=="undefined"){errorUrl+="&location=";errorUrl+=encodeURIComponent(error.location);}var errorXhr=new XMLHttpRequest();errorXhr.open("GET",errorUrl);errorXhr.withCredentials=true;errorXhr.crossDomain=true;errorXhr.send(null);}}catch(err){}}function prepareLockedErrorInfo(lockedId,lockedUrl,lockedResponse,lockedErrorMessage,traceError,xhrlockedResponse,identifier){try{accountError(lockedId,lockedUrl,lockedResponse,lockedErrorMessage,traceError,xhrlockedResponse,identifier);var columnInformation=document.createElement("div");columnInformation.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"divColumn1Article");var columnBodyText=document.createElement("div");columnBodyText.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"articleBodyText emptyBodyText");var errorInformation=document.createElement("div");errorInformation.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"article-premium__teaser article-premium__teaser--box-error article-premium__teaser--box-alone");var errorHeader=document.createElement("div");errorHeader.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"wwu");var errorHead=document.createElement("h5");errorHead.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"wwu__head");errorHead.innerHTML="Tillfälligt fel";var errorText=document.createElement("div");errorText.setAttribute("class"https://computersweden.idg.se/2.2683/1.774988/,"wwu__lead");errorText.innerHTML="Artikeln kunde tyvärr inte hämtas. Vänligen försök igen om en stund.";errorHeader.appendChild(errorHead);errorHeader.appendChild(errorText);errorInformation.appendChild(errorHeader);columnBodyText.appendChild(errorInformation);columnInformation.appendChild(columnBodyText);return columnInformation;}catch(err){window.IDG_CONFIGURATION.auth.error.push({message:"Error prepareLockedErrorInfo "+err.message});return null;}}function prepareLockedInfo(lockedId,lockedPageNumber,lockedPageSelector,lockedResponse){var response=lockedResponse;var currentLayer=window.dataLayer[0];for(var i in window.dataLayer){if(typeof window.dataLayer[i]!=="function"&&typeof window.dataLayer[i].articleId!=="undefined"&&window.dataLayer[i].articleId===lockedId){currentLayer=window.dataLayer[i];break;}}var clickSettings={category:"Article Paywall",action:"To: ",label:"From: "+(currentLayer.headline.length>0?currentLayer.headline:currentLayer.property)+" → "+currentLayer.property+" → "+currentLayer.contentId};var returnurl=null;var currentDomain=null;var property=dataLayer[0].property;try{if(typeof currentLayer.property!=="undefined"&¤tLayer.property!==null&¤tLayer.property.length>0){property=currentLayer.property;}currentDomain="https://";if(property==="idgse"){currentDomain+="www";}else{currentDomain+=property;}currentDomain+=".idg.se";}catch(err){}var article=null;try{article=document.querySelector(".page-"+lockedPageNumber);if(article!==null&¤tDomain!==null){var part=article.getAttribute("data-article-ga-url");if(typeof part!=="undefined"&&part!==null){returnurl=currentDomain+part.trim();}}}catch(err){}if(returnurl===null&¤tDomain!==null){returnurl=currentDomain+"/"+currentLayer.layoutId+"/"+currentLayer.articleId;}if(returnurl===null){try{if(lockedPageNumber===1){var canonical=document.querySelector("link[rel="canonical"]");if(typeof canonical!=="undefined"&&canonical!==null){returnurl=canonical.getAttribute("href");if(!(typeof returnurl!=="undefined"&&returnurl!==null&&returnurl.length>0&&returnurl.indexOf(property)>-1)){returnurl=null;}}}if(article!==null&&returnurl===null){returnurl=article.getAttribute("data-article-canonical");}if(typeof returnurl!=="undefined"&&returnurl!==null){returnurl=returnurl.trim();}else{returnurl=null;}}catch(err){}}if(typeof returnurl!=="undefined"&&returnurl!==null){try{if(returnurl.indexOf("http://")>-1){returnurl=returnurl.replace("http://"https://computersweden.idg.se/2.2683/1.774988/,"https://");}returnurl=encodeURIComponent(returnurl);}catch(err){returnurl="";}}else{returnurl="";}var userExists=(typeof window.IDG_CONFIGURATION.auth.user!=="undefined");if(currentLayer.audience==="enterprise"){try{var visitingHour="";var trafficSource="";var paywallViews="";var hourFrom=19;var hourTo=4;var hourNow=new Date().getHours();if(hourNow>=hourFrom&&hourTo<=hourNow){visitingHour="visitingOoo";}else{var documentRef="";if(typeof document.referrer!=="undefined"&&document.referrer!==null){documentRef=document.referrer;}var refTwitter="https://t.co/";var refFb="facebook.com";var refGoogle="google.com";var refConditions=[refTwitter,refFb,refGoogle];if(refConditions.some(function(v){return documentRef.indexOf(v)>=0;})){trafficSource="refMatch";}else{if(localStorage.getItem("permutive-data")!==null){var f=JSON.parse(localStorage.getItem("permutive-data")).query_states;var allSegments=f;var pwSegment="26579";if(allSegments.hasOwnProperty(pwSegment)){if(allSegments[pwSegment]["result"]["result"]){paywallViews="paywallHit";}}}}}if((trafficSource=="refMatch")||(paywallViews=="paywallHit")||(visitingHour=="visitingOoo")){var rootElement=document.documentElement;rootElement.classList.add("wwu--has-v1");}}catch(err){}}if(window.dataLayer[0].view==="in-app-ios"){try{var headline=response.querySelector(".wwu__head");if(headline!==null){if(userExists){headline.innerHTML="Du är inloggad som "+window.IDG_CONFIGURATION.account.package_name+"-medlem";}else{headline.innerHTML="Logga in";}}var lead=response.querySelector(".wwu__lead");if(lead!==null){var iosPackageName=(currentLayer.audience==="consumer"?window.IDG_CONFIGURATION.account.package_name_consumer:window.IDG_CONFIGURATION.account.package_name_enterprise);if(userExists){lead.innerHTML="Som "+iosPackageName+'-medlem läser du artiklar obegränsat. Tyvärr kan du inte ändra ditt medlemskap i appen.
Läs om hur du ändrar ditt medlemskap på support.idg.se';}else{lead.innerHTML="Som "+iosPackageName+"-medlem läser du artiklar obegränsat.";}}var primaryButton=response.querySelector("button[data-auth]");if(primaryButton!==null){primaryButton.parentNode.removeChild(primaryButton);}if(!userExists){var secondaryButton=response.querySelector(".wwu__btn--secondary");if(secondaryButton!==null){removeClass(secondaryButton,"wwu__btn--secondary");addClass(secondaryButton,"wwu__btn--primary");}}}catch(err){}}var responseButtons=response.querySelectorAll(".wwu__btn");for(var i in responseButtons){try{var current=responseButtons[i];if(typeof current==="object"){var clickElement=current;var listener=current.getAttribute("data-listener");if(!(listener!==null&&typeof listener!=="undefined")){var parentLink=current.parentElement;if(parentLink!==null&&parentLink.tagName==="A"){clickElement=parentLink;try{var href=clickElement.getAttribute("href");if(href!==null&&href.indexOf("return=http")>-1&&href.indexOf("return=https")<0){clickElement.setAttribute("href",href.replace("return=http"https://computersweden.idg.se/2.2683/1.774988/,"return=https"));}}catch(error){}}clickElement.addEventListener("click",function(e){var button=e.target;if(e.target.tagName==="A"){button=e.target.querySelector("button");}if(typeof IDGTrackEvent!=="undefined"){IDGTrackEvent(clickSettings.category,clickSettings.action+button.innerText,clickSettings.label);}});}}}catch(err){}}var responseLinks=response.querySelectorAll("a[data-member-link]");for(var i in responseLinks){try{var current=responseLinks[i];if(typeof current==="object"){var linkElement=current;var href=window.IDG_CONFIGURATION.account.page+linkElement.getAttribute("data-member-link");if(href!==null&&!(href.indexOf("return=")>-1)&&returnurl!==null&&returnurl.length>0){href+=(href.indexOf("?")>=0?"&":"?");href+="return=";href+=returnurl;}linkElement.setAttribute("href",href);linkElement.addEventListener("click",function(e){if(typeof IDGTrackEvent!=="undefined"){IDGTrackEvent(clickSettings.category,clickSettings.action+e.target.innerText,clickSettings.label);}});}}catch(err){}}return response;}function loadLockedArticleHtml(lockedId,lockedPageNumber,lockedPageSelector){var pageNum=1;try{var regexp=/(\/sida\/)([0-9]{1,3})/g;var match=regexp.exec(window.location.href);if(match!=null){var num=parseInt(match[2],10);if(num>=1){pageNum=num;}}}catch(err){}var articleUrl=window.IDG_CONFIGURATION.account.source;articleUrl+=window.IDG_CONFIGURATION.account.path_ar;articleUrl+="/";articleUrl+=lockedId;articleUrl+="/";articleUrl+=pageNum;var lockedXhr=new XMLHttpRequest();lockedXhr.open("GET",articleUrl);lockedXhr.withCredentials=true;lockedXhr.crossDomain=true;lockedXhr.onload=function(){var hasError=false;try{var data=lockedXhr.responseText;var code=data.replace(/document.write/gi,"console.error");var wrapper=document.createElement("div");wrapper.innerHTML=code;var response=wrapper.firstElementChild.cloneNode(true);if(typeof response!=="undefined"&&response!==null){var access=hasClass(response,window.IDG_CONFIGURATION.premium.access);hasError=hasClass(response,"error");var dataUser=response.getAttribute("data-user");if(typeof dataUser!=="undefined"&&dataUser!==null&&dataUser.length>0){var user=JSON.parse(dataUser.replace(/\'/g,'"'));window.IDG_CONFIGURATION.auth.user=user;if(typeof user.packages!=="undefined"){window.IDG_CONFIGURATION.auth.packages=user.packages;}}if(!access){response=prepareLockedInfo(lockedId,lockedPageNumber,lockedPageSelector,response);}if(hasError){response=prepareLockedErrorInfo(lockedId,articleUrl,response,null,null,lockedXhr,"lockedXhr onload hasError");}if(typeof response!=="undefined"&&response!==null){var articleElement=document.getElementsByClassName("page-"+lockedPageNumber)[0];if(typeof articleElement!=="undefined"){var lockedColumn=articleElement.getElementsByClassName("divColumn1Article");if(typeof lockedColumn!=="undefined"&&lockedColumn.length>0){lockedColumn[0].replaceWith(response);if(response.getAttribute("data-unlocked-first-page")==="true"){addClass(articleElement,"article-premium--intro");}if(access){addClass(articleElement,window.IDG_CONFIGURATION.premium.unlocked);removeClass(articleElement,window.IDG_CONFIGURATION.premium.locked);addImageTracker("https://ax.idg.se/ko01/"+lockedId+"-unlock/pis.gif",articleElement);}else{addClass(articleElement,window.IDG_CONFIGURATION.premium.locked);addImageTracker("https://ax.idg.se/ko01/"+lockedId+"-wwu/pis.gif",articleElement);}removeClass(articleElement,window.IDG_CONFIGURATION.premium.loading);articleBodyReady(lockedPageNumber,lockedPageSelector,lockedId,hasClass(articleElement,"sparticle"));}else{window.lockedArticleBody=response;if(access){addImageTracker("https://ax.idg.se/ko01/"+lockedId+"-unlock/pis.gif",document.body);}else{addImageTracker("https://ax.idg.se/ko01/"+lockedId+"-wwu/pis.gif",document.body);}}}else{window.lockedArticleBody=response;if(access){addImageTracker("https://ax.idg.se/ko01/"+lockedId+"-unlock/pis.gif",document.body);}else{addImageTracker("https://ax.idg.se/ko01/"+lockedId+"-wwu/pis.gif",document.body);}}}else{unhandledLockedError(lockedId,lockedPageNumber,articleUrl,"Missing required response to render",null,lockedXhr,"lockedXhr onload handling response");}}else{unhandledLockedError(lockedId,lockedPageNumber,articleUrl,"Missing required response to render",null,lockedXhr,"lockedXhr onload response");}}catch(error){if(hasError){unhandledLockedError(lockedId,lockedPageNumber,articleUrl,error.message,(error.stack||error.stacktrace),lockedXhr,"lockedXhr onload catch hasError");}else{accountError(lockedId,articleUrl,null,error.message,(error.stack||error.stacktrace),lockedXhr,"lockedXhr onload catch");}}finally{authReady(lockedPageNumber);}};lockedXhr.onerror=function(e){unhandledLockedError(lockedId,lockedPageNumber,articleUrl,e.message,(e.stack||e.stacktrace),lockedXhr,"lockedXhr onerror");authReady(lockedPageNumber);};lockedXhr.send(null);}if(window.dataLayer[0].locked==="true"&&window.dataLayer[0].unlockedByTime!=="true"&&(window.dataLayer[0].pageNumber!=="1"||(window.dataLayer[0].pageNumber==="1"&&window.dataLayer[0].lockedFirstPage==="true"))){loadLockedArticleHtml(window.dataLayer[0].articleId,1,"page-1");}else{if(window.IDG_CONFIGURATION.account.enabled){var authXhr=new XMLHttpRequest();authXhr.open("GET",window.IDG_CONFIGURATION.account.source+window.IDG_CONFIGURATION.account.path_au);authXhr.withCredentials=true;authXhr.crossDomain=true;authXhr.onload=function(){try{var response=JSON.parse(authXhr.responseText);if(typeof response.error!=="undefined"){accountError(null,window.IDG_CONFIGURATION.account.source+window.IDG_CONFIGURATION.account.path_au,null,response.message,null,authXhr,"authXhr onload response.error");}else{if(response.success&&typeof response.user!=="undefined"){window.IDG_CONFIGURATION.auth.user=response.user;if(typeof response.user.packages!=="undefined"){window.IDG_CONFIGURATION.auth.packages=response.user.packages;}}}}catch(error){accountError(null,window.IDG_CONFIGURATION.account.source+window.IDG_CONFIGURATION.account.path_au,null,error.message,(error.stack||error.stacktrace),authXhr,"authXhr onload catch");}finally{authReady(1);}};authXhr.onerror=function(e){accountError(null,window.IDG_CONFIGURATION.account.source+window.IDG_CONFIGURATION.account.path_au,null,e.message,(e.stack||e.stacktrace),authXhr,"authXhr onerror");authReady(1);};authXhr.send(null);}else{window.IDG_CONFIGURATION.auth.state="ready";window.IDG_CONFIGURATION.waiting_auth=false;gaPageView(1);ioPageView(dataLayer[0]);}}if(window.location.href.indexOf("tooltip=welcome")>-1){document.documentElement.classList.add("idg-konto-tip--active");setTimeout(function(){removeClass(document.documentElement,"idg-konto-tip--active");},4000);}