Question : Will a GUID lose it’s uniqueness when you remove the dashes (-)?

Today while I was fixing an issue at TeamMentor, I wanted to play around with the URL manipulation.

Url manipulation

I tried to remove all the dashes (-) from the URL  GUID to see what would be the behavior. And I was able to see the same article without any side effect (by side-effect I mean that the result was the same).

integrity

I was wondering if the fact of removing the dashes from a given GUID should cause any damage to the integrity of that GUID. I did a quick search on internet and I found this thread at StackOverflow called “Is good idea to remove dash from a GUID?”

The short answer given to this question is that the integrity or uniqueness of the GUID is guaranteed even after removing the dash. Also in this thread, some of the folks state that dash are added for readability purposes. The anatomy of a GUID is described here

In fact  by reading this thread at StackOverflow, I discovered that using .Net you can generate a GUID without the dashes. I used PowerShell to give it a try.

PS

About Michael Hidalgo

Michael is a Software Developer Engineer based on San José, Costa Rica. He leads the OWASP Chapter from Costa Rica. You can take a look at my blog at http://blog.michaelhidalgo.info/
This entry was posted in GUIDS and tagged , . Bookmark the permalink.

1 Response to Question : Will a GUID lose it’s uniqueness when you remove the dashes (-)?

  1. Good article about the test of command injection vulnerabilities

Leave a comment