Questions tagged [canonicalization]

is a process for converting data that has more than one possible representation into a "standard", "normal", or canonical form.

As per Wikipedia:

In computer science, canonicalization (abbreviated c14n, where 14 represents the number of letters between the C and the N; also sometimes standardization or normalization) is a process for converting data that has more than one possible representation into a "standard", "normal", or canonical form. This can be done to compare different representations for equivalence, to count the number of distinct data structures, to improve the efficiency of various algorithms by eliminating repeated calculations, or to make it possible to impose a meaningful sorting order.

197 questions
0
votes
1 answer

A library to produce canonical XML in JAVA 5?

I'm using org.apache.xml.security.c14n.Canonicalizer which was recommended to me here: Sort xml attributes for pretty print using javax.xml.transform.Transformer. I will need it to run in Java 5 though.. it doesn't seem to work. Are there any…
filippo
  • 5,583
  • 13
  • 50
  • 72
0
votes
0 answers

Canonicalization node not closed properly

TL;DR node winds up with too many children when using wse-php I'm using wse-php to sign a SOAP request. I've used plain XmlSecLib to sign Saml in the past, but when using wse-php to construct my security node and sign a…
ginc
  • 1
  • 2
0
votes
0 answers

Canonicalize XML using Rust

I need to canonicalize XML structures as described in the W3C specification Exclusive XML Canonicalization Version 1.0 (xml-exc-c14n). Unfortunately, I could not find this implemented in any of the XML libraries I looked at (quick-xml, xml-rs...).…
0
votes
0 answers

Fast, reliable redirection to a single canonical URL?

I currently have a mess of an Apache .htaccess file to (attempt to) ensure a canonical URL for every page on my site, and that URLs do not reflect the underlying technology or whether the page is a file or a directory. For…
Jerry Stratton
  • 3,287
  • 1
  • 22
  • 30
0
votes
0 answers

How to handle arrays when hashing in terms of JSON Canonicalization?

I am trying to hash a JSON object to check for changes. I am using a custom ObjectMapper: public static final ObjectMapper mapper = new ObjectMapper().configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true) …
mortimerfreeze
  • 199
  • 1
  • 1
  • 9
0
votes
0 answers

lxml - ValueError: Namespace ... of name ... is not declared in scope

When calling lxml.etree.canonicalize(node) a ValueError exception is raised: Namespace "{}" of name "" is not declared in scope. In this particular case the message is ValueError: Namespace "http://schemas.xmlsoap.org/soap/envelope/" of…
Adan Cortes
  • 1,058
  • 8
  • 13
0
votes
0 answers

IIS10 UrlRewrite Canonical Rule with Multiple Domains

I am using the DNN CMS that allows multiple portals (many websites) under 1 IIS website. In this situation I cannot use the standard canonical rule below because I have multiple bindings for different domains but am getting errors on Google search…
UserSN
  • 953
  • 1
  • 11
  • 33
0
votes
1 answer

How to do IP Canonicalization in .htaccess? for wordpress website

IP canonicalization is the process of making sure that all versions of your website that can be accessed using an IP address are redirected to the domain name version of the site. This helps to improve the user experience and ensure that search…
0
votes
1 answer

Namespace prefix rewriting for XML cononicalization in Java?

I'm trying to 1) compute the digital signature for an XML string, 2) unmarshall the XML string to a Java object, 3) marshall the object back to an XML string, and 4) re-compute signature, and verify against the signature from step 1. Problem is that…
Boris
  • 1
0
votes
2 answers

How to apply canonicalization before signing JSON-LD Verifiable Credential?

I want to sign Verifiable Credential in JSON structure with Linked Data (JSON-LD) like below: { "@context":[ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/security/bbs/v1" ], "id":"1234", "type":[ …
APTower
  • 343
  • 2
  • 8
0
votes
3 answers

Converting Similar names to canonical form in SQL

I have a database of books. There can be situations where an author can use variations of their names as author. For eg. Albert Einstein can be written as Albert E. or A. Einstein Now I need to create a method such that SQL database and tell me the…
sidewala
  • 61
  • 4
0
votes
0 answers

Proper use of Canonicalizer() in Java

I have been trying to properly implement a Java method using Canonicalizer. I pulled down the xmlsec-2.3.0.jar file and placed it in my build path. I have no initial errors showing up in esclipse until I compile and the error in my opinion makes…
ChrisF
  • 1
0
votes
0 answers

.htaccess Rewrite code to 301 redirect my URL path to fix canonical issues

I discovered recently that a Hostgator tech inserted rewrite code in my .htaccess file which 302 redirected all of my pages to https://example.com even though I wasn't using that URL path for my sitemap or internal links. Now I have a mix of URL…
David B
  • 1
  • 1
0
votes
0 answers

Duplicate, submitted URL not selected as canonical

I have my canonical tag URL as http://www.example.com/ in HTML header and also same in sitemap.xml. my host has enabled SSL and previously in search console I have been added HTTPS version of my address and three green check marks showed and was…
0
votes
0 answers

How can we fix checkmarx vulnerability Cleansing_Canonicalization_and_Comparison_Errors in C#?

Can anyone help me in fixing Cleansing_Canonicalization_and_Comparison_Errors vulnerability in below code- string appServerPath = string.Empty; appPath = ConfigurationManager.AppSettings["ServerPath"].ToString(); try …