mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 00:10:57 +00:00 
			
		
		
		
	Merge pull request #1551 from benphelps/fix/issue-1547
Fix: Properly encode qbittorrent credentials
This commit is contained in:
		
						commit
						498089a8fa
					
				@ -8,7 +8,7 @@ const logger = createLogger("qbittorrentProxyHandler");
 | 
				
			|||||||
async function login(widget) {
 | 
					async function login(widget) {
 | 
				
			||||||
  logger.debug("qBittorrent is rejecting the request, logging in.");
 | 
					  logger.debug("qBittorrent is rejecting the request, logging in.");
 | 
				
			||||||
  const loginUrl = new URL(`${widget.url}/api/v2/auth/login`).toString();
 | 
					  const loginUrl = new URL(`${widget.url}/api/v2/auth/login`).toString();
 | 
				
			||||||
  const loginBody = `username=${encodeURI(widget.username)}&password=${encodeURI(widget.password)}`;
 | 
					  const loginBody = `username=${encodeURIComponent(widget.username)}&password=${encodeURIComponent(widget.password)}`;
 | 
				
			||||||
  const loginParams = {
 | 
					  const loginParams = {
 | 
				
			||||||
    method: "POST",
 | 
					    method: "POST",
 | 
				
			||||||
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
 | 
					    headers: { "Content-Type": "application/x-www-form-urlencoded" },
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user