So on the Wikipedia page for flag of Morocco, they list this flag as one used in the early 20th century. I take issue with this, after doing no insignificant amount of research, I cannot find any real sources that describe that flag.
The source that Wikipedia provides is the "Nouveau Petit Larousse Illustre, 1924" the problem with that is that that couldn't possibly be the Moroccan flag in 1924 as the flag was officialy the five pointed star version by the 7th of November, 1915 (the translation of the relevant part of this Dahir (royal decree) is: "We have decreed to distinguish our flag by ornamenting its center with the Seal of Solomon with five branches, of green colour") This is clearly describing the current Moroccan flag, so the 1924 Larousse must be mistaken.
This website also describes a six pointed star and cites another Larousse, this time from 1934. My issue with this source is the same. If there ever was a window for there to be a six pointed star, it was between 1912 (the beginning of the protectorate) and 1915 (the establishment of the modern pentagram flag).
Some websites will tell the story like this: In 1912, Moulay Yusuf (the new king, as his brother had abdicated after signing the treaty making Morocco a French protectorate) put a six pointed star on the Moroccan flag, in 1915 -prior to sending Moroccan troops to fight in WWI- the protector-general of Morocco, Hubert Lyautey forces Yusuf's hand and makes Yusuf proclaim the 7th of November decree. The websites that repeat this story universally have one source (which quotes another source) a 2005 article from TelQuel by a Lamia Bouzbouz which claims the following (translated):
"According to Moroccan historian Rachid Sbihi, the pentagram was imposed on the Sultan Moulay Youssef by General Lyautey in 1915 when this latter was preparing to bring the Moroccan contingent to Europe to fight on the French front. "By the way, the question is why did Lyautey decide, at that precise moment to change the six pointed star into a five pointed one. We unfortunately do not have available a precise answer", he explains"
Once again however, I find this source inadequate because this Rachid Sbihi fellow does not seem to have ever published anything, the only mention of him online is when he is being quoted in this same article.
A Mr. S. Mitchell claims in this website that "By 1915, Morocco changed rule, and Mulay Yusuf reigned over the country. It was Yusuf who decided the Seal of Solomon had to be on the flag. The seal was green and reflective. It was of an interlaced pentangle or star. The pentangle is considered a form of occult law. The Seal of Solomon was a six-pointed star originally (before the 1900s) and was also known as the Star of David. During World War I, the flag underwent another change from the six-pointed star to a five-pointed star, thus the pentangle" but this guy has his dates all wrong, claiming that it was a six pointed star before the 1900s when there is no other source that even begins to hint this.
In her book “Moroccan Feminist Discourses (2014)” Fatima Sadiqi writes: “It is also interesting to note that until the beginning of the last century, the star on the Moroccan flag had the form of the six pointed star of David” This is the first academic source I could find mentioning a six pointed star, but unfortunately Mrs. Sadiqi is not a historian and I am unsure of how much credence to lend her regarding this matter.
¬ TL;DR: Do you know of any primary sources for the flag of Morocco in the time period between 1912 and 1915?
Bonus: This Picture and This Picture seem to be from the same book but attest to different Moroccan flags. Can anyone tell from the pixels and having seen a lot of shoops in their time whether one of them was modified?
Before 1915 there was no Moroccan national flag codified in law exactly, but Moroccan ships did follow the standard Arab practice of flying plain red flags. So most flag charts from the era you're talking about -- including the 1912 edition of Petit Larousse -- show a plain red flag as the flag of Morocco. See for example here, here, here, and here.
The whole point of the 1915 decree was to distinguish Moroccan ships from non-Moroccan ships, which would not have been necessary if they were already flying a flag with a six-pointed Seal of Solomon. The earliest drawings with a six-pointed star that I'm aware of come from the 1920s, which means they're just errors.
As for those two photos, I believe they're just from different editions of Petit Larousse.