Repository: stable-diffusion-webui
Issue: [Bug]: "Image not allowed"
Labels: bug-report

### Checklist

- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

The output folder for my installation is a junction. It's there to use multiple image generation installations.
With a fresh 1.8.0, the image isn't displayed anymore after generation, just a 'broken icon'.

![Zwischenablagebild (1)](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/122026301/e72a5ca6-19d8-463d-9827-25c351b7996f)

Opening the URL for the image gives a JSON output:
error | "HTTPException"
detail | "File not allowed: V:/stable_diffusion_shared/outputs/txt2img-images/test/Test Image/Crystal Clear XL_v1.0_SDXL1.0/00003-S=3154920067-St=40-Sa=DPM++ 3M SDE Karras-Cfg=7.png."
errors | "(403, 'File not allowed: V:/stable_diffusion_shared/outputs/txt2img-images/test/Test Image/Crystal Clear XL_v1.0_SDXL1.0/00003-S=3154920067-St=40-Sa=DPM++ 3M SDE Karras-Cfg=7.png.')"

In 1.70 it works perfectly fine, so something weird happened in 1.8.0 again. How to fix that, please?

### Steps to reproduce the problem

Generate image
Broken preview

### What should have happened?

Accessible preview

### What browsers do you use to access the UI ?

Mozilla Firefox

### Sysinfo

[sysinfo-2024-03-02-11-14.json](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/14469076/sysinfo-2024-03-02-11-14.json)


### Console logs

```Shell
Restarting UI...
Closing server running on port: 7861
Running on local URL:  http://127.0.0.1:7861

To create a public link, set `share=True` in `launch()`.
Startup time: 1.6s (load scripts: 0.2s, create ui: 0.7s, gradio launch: 0.1s, add APIs: 0.4s).
  0%|                                  V:\AI_programms\stable-diffusion-webui-180\venv\lib\site-packages\torchsde\_brownian\brownian_interval.py:608: UserWarning: Should have tb<=t1 but got tb=14.614643096923828 and t1=14.614643.
  warnings.warn(f"Should have {tb_name}<=t1 but got {tb_name}={tb} and t1={self._end}.")
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00,  1.52it/s]
*** Error completing request,  1.59it/s]
*** Arguments: ('task(of18gch6f385kxf)', <gradio.routes.Request object at 0x00000181B5C1E5F0>, '[Test Image:9999]photo of a delicious grilled steak with side dishes, laying on many white feathers on a dark wooden table, food photography, intricate details, sharp focus, ambient lighting', 'deviantart', [], 40, 'DPM++ 3M SDE Karras', 1, 1, 7, 848, 1200, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], 0, False, '', 0.8, -1, False, -1, 0, 0, 0, False, '', 0.5, True, False, '', 'Lerp', False, False, False, 'positive', 'comma', 0, False, False, 'start', '', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "V:\AI_programms\stable-diffusion-webui-180\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "V:\AI_programms\stable-diffusion-webui-180\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\txt2img.py", line 110, in txt2img
        processed = processing.process_images(p)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\processing.py", line 785, in process_images
        res = process_images_inner(p)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\processing.py", line 1016, in process_images_inner
        images.save_image(image, p.outpath_samples, "", p.seeds[i], p.prompts[i], opts.samples_format, info=infotext(i), p=p)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 685, in save_image
        _atomically_save_image(image, fullfn_without_extension, extension)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 669, in _atomically_save_image
        save_image_with_geninfo(image_to_save, info, temp_file_path, extension, existing_pnginfo=params.pnginfo, pnginfo_section_name=pnginfo_section_name)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 537, in save_image_with_geninfo
        image_format = Image.registered_extensions()[extension]
    KeyError: ''

---
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00,  1.52it/s]
*** Error completing request,  1.59it/s]
*** Arguments: ('task(90660ypyq6ur0d0)', <gradio.routes.Request object at 0x000001830175E2C0>, '[Test Image:9999]photo of a delicious grilled steak with side dishes, laying on many white feathers on a dark wooden table, food photography, intricate details, sharp focus, ambient lighting', 'deviantart', [], 40, 'DPM++ 3M SDE Karras', 1, 1, 7, 848, 1200, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], 0, False, '', 0.8, -1, False, -1, 0, 0, 0, False, '', 0.5, True, False, '', 'Lerp', False, False, False, 'positive', 'comma', 0, False, False, 'start', '', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "V:\AI_programms\stable-diffusion-webui-180\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "V:\AI_programms\stable-diffusion-webui-180\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\txt2img.py", line 110, in txt2img
        processed = processing.process_images(p)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\processing.py", line 785, in process_images
        res = process_images_inner(p)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\processing.py", line 1016, in process_images_inner
        images.save_image(image, p.outpath_samples, "", p.seeds[i], p.prompts[i], opts.samples_format, info=infotext(i), p=p)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 685, in save_image
        _atomically_save_image(image, fullfn_without_extension, extension)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 669, in _atomically_save_image
        save_image_with_geninfo(image_to_save, info, temp_file_path, extension, existing_pnginfo=params.pnginfo, pnginfo_section_name=pnginfo_section_name)
      File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 537, in save_image_with_geninfo
        image_format = Image.registered_extensions()[extension]
    KeyError: ''

---
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00,  1.51it/s]
Total progress: 200it [04:26,  1.33s/it]
Restarting UI...200it [04:26,  1.58it/s]
Closing server running on port: 7861
Running on local URL:  http://127.0.0.1:7861

To create a public link, set `share=True` in `launch()`.
Startup time: 1.5s (load scripts: 0.2s, create ui: 0.8s, gradio launch: 0.1s, add APIs: 0.2s).
  0%|                                                                                  | 0/40 [00:00<?, ?it/s]V:\AI_programms\stable-diffusion-webui-180\venv\lib\site-packages\torchsde\_brownian\brownian_interval.py:608: UserWarning: Should have tb<=t1 but got tb=14.614643096923828 and t1=14.614643.
  warnings.warn(f"Should have {tb_name}<=t1 but got {tb_name}={tb} and t1={self._end}.")
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00,  1.50it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:27<00:00,  1.44it/s]
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00,  1.50it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:28<00:00,  1.43it/s]
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00,  1.51it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:27<00:00,  1.44it/s]
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00,  1.52it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:27<00:00,  1.44it/s]
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00,  1.49it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:28<00:00,  1.42it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:28<00:00,  1.59it/s]
```


### Additional information

_No response_