File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,10 @@ public function getSortKeyAttribute(): string
144144
145145 public function addAttribute (string $ key ,mixed $ value ): void
146146 {
147+ // While $value is mixed, it can only be a string
148+ if (! is_string ($ value ))
149+ throw new \Exception ('value should be a string ' );
150+
147151 $ key = $ this ->normalizeAttributeKey ($ key );
148152
149153 if (! config ('server ' )->schema ('attributetypes ' )->has ($ key ))
@@ -239,11 +243,12 @@ public function getAvailableAttributes(): Collection
239243
240244 /**
241245 * Return a secure version of the DN
246+ * @param string $cmd
242247 * @return string
243248 */
244- public function getDNSecure (): string
249+ public function getDNSecure (string $ cmd = '' ): string
245250 {
246- return Crypt::encryptString ($ this ->getDn ());
251+ return Crypt::encryptString (( $ cmd ? sprintf ( ' *%s| ' , $ cmd ) : '' ). $ this ->getDn ());
247252 }
248253
249254 /**
You can’t perform that action at this time.
0 commit comments