kopia lustrzana https://github.com/meshtastic/firmware
				
				
				
			Don't allow arbitrary channel name for admin (#1886)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>pull/1884/head^2
							rodzic
							
								
									85b541bfd9
								
							
						
					
					
						commit
						b2969b2faf
					
				| 
						 | 
				
			
			@ -109,10 +109,7 @@ void MeshModule::callPlugins(const MeshPacket &mp, RxSource src)
 | 
			
		|||
            /// Also: if a packet comes in on the local PC interface, we don't check for bound channels, because it is TRUSTED and it needs to
 | 
			
		||||
            /// to be able to fetch the initial admin packets without yet knowing any channels.
 | 
			
		||||
 | 
			
		||||
            bool rxChannelOk = !pi.boundChannel || (mp.from == 0) ||
 | 
			
		||||
                !ch ||
 | 
			
		||||
                strlen(ch->settings.name) > 0 ||
 | 
			
		||||
                (strcasecmp(ch->settings.name, pi.boundChannel) == 0);
 | 
			
		||||
            bool rxChannelOk = !pi.boundChannel || (mp.from == 0) || (strcasecmp(ch->settings.name, pi.boundChannel) == 0);
 | 
			
		||||
 | 
			
		||||
            if (!rxChannelOk) {
 | 
			
		||||
                // no one should have already replied!
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue